Skip to content

Fix rank method with nullable int #57779

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

Merged
merged 2 commits into from
Mar 8, 2024
Merged

Conversation

tqa236
Copy link
Contributor

@tqa236 tqa236 commented Mar 8, 2024

We can't pass only self._values_for_argsort() to rank as the missing data info will be lost. Fortunately, passing self directly to rank seems to work just fine.

@tqa236 tqa236 marked this pull request as draft March 8, 2024 12:24
@tqa236 tqa236 marked this pull request as ready for review March 8, 2024 13:54
Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Could you add a whatsnew note in v3.0.0.rst?

@mroeschke mroeschke added NA - MaskedArrays Related to pd.NA and nullable extension arrays Reduction Operations sum, mean, min, max, etc. labels Mar 8, 2024
@tqa236
Copy link
Contributor Author

tqa236 commented Mar 8, 2024

Thank you for the review. I added the note.

@mroeschke mroeschke added this to the 3.0 milestone Mar 8, 2024
@mroeschke mroeschke merged commit 95ab36d into pandas-dev:main Mar 8, 2024
@mroeschke
Copy link
Member

Great thanks @tqa236

@tqa236 tqa236 deleted the nullable-int branch March 17, 2024 07:53
pmhatre1 pushed a commit to pmhatre1/pandas-pmhatre1 that referenced this pull request May 7, 2024
* Fix rank method with nullable int

* Add whatsnew note
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
NA - MaskedArrays Related to pd.NA and nullable extension arrays Reduction Operations sum, mean, min, max, etc.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BUG: rank does not respect na_option='keep' for numpy nullable integer dtypes
2 participants