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
fix(python): allow map_dict on categorical dtype #7097
fix(python): allow map_dict on categorical dtype #7097
Conversation
Thanks! Can you undraft? It should be good to go. |
Done :) |
Not sure if this is the correct place to comment - but I think if you set the |
The issue is that I'm not sure to what I would be setting the |
@@ -6296,6 +6299,7 @@ def inner_with_default(s: pli.Series) -> pli.Series: | |||
df = s.to_frame().unnest(s.name) if s.dtype == Struct else s.to_frame() | |||
|
|||
column = df.columns[0] | |||
input_dtype = df.select(column).dtypes[0] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe replace with: input_dtype = df.dtypes[0]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed in #7217. I guess I didn't fully realize that we always operate on the first field in the struct 😓
My bad, I was only thinking in terms of strings/categoricals for some reason - missing the fact that one could be returning a different type from the dict. I thought the |
See #7077