-
-
Notifications
You must be signed in to change notification settings - Fork 19.4k
BUG: mode not sorting values for arrow backed strings #55621
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
Conversation
pandas/tests/groupby/test_groupby.py
Outdated
| object, | ||
| pytest.param( | ||
| "string[pyarrow_numpy]", | ||
| marks=pytest.mark.skipif(pa_version_under7p0, reason="arrow not installed"), |
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.
Could you use an importorskip in the test when dtype is pyarrow_numpy? (avoids having to change pa_version_under7p0 every time we bump pyarrow)
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.
thoughts about creating a pyarrow_installed variable?
I like this pattern a bit better than the if inside the test
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.
thoughts about creating a pyarrow_installed variable?
Sure this would be good too
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.
done
pandas/tests/groupby/test_groupby.py
Outdated
| object, | ||
| pytest.param( | ||
| "string[pyarrow_numpy]", | ||
| marks=pytest.mark.skipif(pa_installed, reason="arrow not installed"), |
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.
This condition is backwards?
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.
oh thx, oversight
# Conflicts: # pandas/tests/groupby/test_groupby.py
pandas/tests/groupby/test_groupby.py
Outdated
| True, | ||
| pytest.param( | ||
| True, | ||
| marks=pytest.mark.skipif(not pa_installed, reason="arrow not installed"), |
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 just realized we have a td.skip_if_no mark as well
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.
does this work inside of pytest.param as well?
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.
It should, yeah. It returns a skipif marker
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.
Yep, thx
pandas/compat/pyarrow.py
Outdated
| pa_version_under7p0 = True | ||
| pa_version_under8p0 = True | ||
| pa_version_under9p0 = True | ||
| pa_version_under10p0 = True |
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.
Why do we need these?
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.
got in while merging main, sorry
lithomas1
left a comment
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.
Thanks, this LGTM.
I'll merge this tomorrow morning assuming no other comments.
|
Thanks @phofl |
|
Owee, I'm MrMeeseeks, Look at me. There seem to be a conflict, please backport manually. Here are approximate instructions:
And apply the correct labels and milestones. Congratulations — you did some good work! Hopefully your backport PR will be tested by the continuous integration and merged soon! Remember to remove the If these instructions are inaccurate, feel free to suggest an improvement. |
* BUG: mode not sorting values for arrow backed strings * Fix tests * Change to pa_installed variable * Update pyarrow.py * Fix * Fix (cherry picked from commit bb2d2e0)
doc/source/whatsnew/vX.X.X.rstfile if fixing a bug or adding a new feature.