-
Notifications
You must be signed in to change notification settings - Fork 36
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
map_elements
cause R session crach for struct
object
#993
Labels
bug
Something isn't working
Comments
Struct type is not supported yet. r-polars/src/rust/src/series.rs Lines 363 to 390 in acc29eb
PRs are welcome! |
I'll try to implement it. |
Shorter reprex: s = pl$Series(values = 1)$to_struct()
s$map_elements(\(x) x)
Error in .pr$Series$map_elements(self, fun, datatype, strict_return_type, :
user function panicked: map_elements |
Turns out Doesn't solve the issue though: library(polars)
pl$DataFrame(mtcars)$
select(pl$struct(c("mpg", "cyl"))$map_elements(\(x) x[["mpg"]]))
#> 1: user function raised an error: EvalError(lang!(function (s) { s$map_elements(f, return_type, strict_return_type, allow_fail_eval)}, ExternalPtr.set_class(["RPolarsSeries"])) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
map_elements
crash forstruct
object, Here is themap_elements
document for struct in Python:https://docs.pola.rs/user-guide/expressions/user-defined-functions/#combining-multiple-column-values
The text was updated successfully, but these errors were encountered: