Skip to content

ENH: Index set operations with sort=True #51346

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 1 commit into from
Feb 13, 2023

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Feb 12, 2023

try:
result = algos.safe_sort(result)
except TypeError as err:
if sort is True:
Copy link
Member

Choose a reason for hiding this comment

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

Do we have tests for these "stricter" raising behavior?

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes, they’re xfailed in main

@mroeschke mroeschke added the Index Related to the Index class or subclasses label Feb 13, 2023
@mroeschke mroeschke added this to the 2.0 milestone Feb 13, 2023
@mroeschke mroeschke merged commit 0e9844a into pandas-dev:main Feb 13, 2023
@mroeschke
Copy link
Member

Thanks @jbrockmendel

@jbrockmendel jbrockmendel deleted the enh-sort-true branch February 13, 2023 18:44
galipremsagar added a commit to rapidsai/cudf that referenced this pull request Dec 29, 2023
…14681)

This PR sorts results in `Index.difference` & `union` in the early exit scenarios similar to: pandas-dev/pandas#51346

On `pandas_2.0_feature_branch`:
```
= 110 failed, 101331 passed, 2091 skipped, 952 xfailed, 312 xpassed in 1064.30s (0:17:44) =
```

This PR:
```
= 87 failed, 101354 passed, 2091 skipped, 952 xfailed, 312 xpassed in 1004.34s (0:16:44) =
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Index Related to the Index class or subclasses
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement sort=True for Index setops
2 participants