-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Fix arrow groupby na #60777
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 arrow groupby na #60777
Changes from all commits
ddd729a
126d963
a463415
67b48d7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1208,7 +1208,12 @@ def factorize( | |
data = data.cast(pa.int64()) | ||
|
||
if pa.types.is_dictionary(data.type): | ||
encoded = data | ||
if null_encoding == "encode": | ||
# dictionary encode does nothing if an already encoded array is given | ||
data = data.cast(data.type.value_type) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can you use There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
encoded = data.dictionary_encode(null_encoding=null_encoding) | ||
else: | ||
encoded = data | ||
else: | ||
encoded = data.dictionary_encode(null_encoding=null_encoding) | ||
if encoded.length() == 0: | ||
|
Uh oh!
There was an error while loading. Please reload this page.