Skip to content
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 DataFrame.sort_index when a index is a MultiIndex #14621

Merged

Conversation

galipremsagar
Copy link
Contributor

Description

This PR fixes sorting of a MultiIndex by removing an existing hard-coded na_position value that was based on ascending flag, essentially ignoring the user-passed parameter.

On pandas_2.0_feature_branch:

= 501 failed, 101106 passed, 2071 skipped, 786 xfailed, 312 xpassed, 20 errors in 1234.91s (0:20:34) =

This PR:

= 405 failed, 101034 passed, 2071 skipped, 954 xfailed, 312 xpassed, 20 errors in 1124.69s (0:18:44) =

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@galipremsagar galipremsagar added bug Something isn't working 3 - Ready for Review Ready for review by team Python Affects Python cuDF API. non-breaking Non-breaking change labels Dec 13, 2023
@galipremsagar galipremsagar self-assigned this Dec 13, 2023
@galipremsagar galipremsagar requested a review from a team as a code owner December 13, 2023 01:08
@galipremsagar galipremsagar requested review from bdice, isVoid and mroeschke and removed request for a team December 13, 2023 01:08
condition=axis in (1, "columns")
and ignore_index
and not (level is None and not ascending),
reason="https://github.com/pandas-dev/pandas/issues/56478",
Copy link
Contributor

Choose a reason for hiding this comment

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

Should hopefully be fixed in pandas 2.2: pandas-dev/pandas#56487

@galipremsagar galipremsagar added 5 - Ready to Merge Testing and reviews complete, ready to merge and removed 3 - Ready for Review Ready for review by team labels Dec 13, 2023
@galipremsagar galipremsagar merged commit 72221b3 into rapidsai:pandas_2.0_feature_branch Dec 13, 2023
19 of 22 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
5 - Ready to Merge Testing and reviews complete, ready to merge bug Something isn't working non-breaking Non-breaking change Python Affects Python cuDF API.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

3 participants