-
-
Notifications
You must be signed in to change notification settings - Fork 18.2k
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
base: main
Are you sure you want to change the base?
Fix arrow groupby na #60777
Conversation
ac8116b
to
0e61611
Compare
0e61611
to
66330ee
Compare
# 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 comment
The reason will be displayed to describe this comment to others. Learn more.
I think you're explaining why you have the cast here, but I'm not quite understanding it. Can you give a bit more details (just as a response here, and we can decide if the comment should be updated later).
- Fixed bug in :meth:`ArrowExtensionArray.factorize` where NA values were dropped when input was dictionary-encoded even when dropna was set to False(:issue:`60567`) | ||
|
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.
Can you move this to an appropriate section below, I think ExtensionArray
.
@@ -3330,6 +3330,19 @@ def test_factorize_chunked_dictionary(): | |||
tm.assert_index_equal(res_uniques, exp_uniques) | |||
|
|||
|
|||
def test_factorize_dictionary_with_na(): | |||
# Test that factorize properly handles NA values in dictionary arrays |
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.
Can you start the test with a comment referencing the issue, e.g.
# GH#60567
doc/source/whatsnew/v3.0.0.rst
file for the bug fix.