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

ENH: Add sort parameter to other set operations if possible #24471

Closed
3 of 6 tasks
reidy-p opened this issue Dec 28, 2018 · 5 comments
Closed
3 of 6 tasks

ENH: Add sort parameter to other set operations if possible #24471

reidy-p opened this issue Dec 28, 2018 · 5 comments
Labels
API - Consistency Internal Consistency of API/Behavior Enhancement setops union, intersection, difference, symmetric_difference

Comments

@reidy-p
Copy link
Contributor

reidy-p commented Dec 28, 2018

As part of #22811 I added a sort parameter to the difference set operation with a default of True. The other set operations do not have this parameter but some of them sort by default if possible. Should we add a sort parameter to the other set operations too if possible for consistency?

TODO:

@jreback
Copy link
Contributor

jreback commented Dec 28, 2018

yes sort=True (default for compat) should be added to all set operations

@reidy-p
Copy link
Contributor Author

reidy-p commented Dec 31, 2018

Related issues: #17839, #17010, #17378, #17376, #22466

@reidy-p
Copy link
Contributor Author

reidy-p commented Feb 3, 2019

@fdroessler As discussed, if you see any other things we need to do to make the implementation of the sort parameter for set operations consistent describe it in a comment below and I'll add it to the TODO in the top comment in this issue. I'm currently working on implementing sort for RangeIndex.union

@jorisvandenbossche jorisvandenbossche added this to the 0.25.0 milestone Feb 23, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 18, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 19, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 19, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 20, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 23, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 24, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 24, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 25, 2019
reidy-p added a commit to reidy-p/pandas that referenced this issue Mar 26, 2019
@jreback jreback modified the milestones: 0.25.0, Contributions Welcome Jun 28, 2019
@jbrockmendel jbrockmendel added the API - Consistency Internal Consistency of API/Behavior label Sep 22, 2020
@YuRenee
Copy link

YuRenee commented Nov 9, 2020

It seems that sort=True hasn't been implemented in the recent release version. I tested and got "ValueError: The 'sort' keyword only takes the values of None or False; True was passed." I can try on this issue.

@jbrockmendel jbrockmendel added the Index Related to the Index class or subclasses label Nov 24, 2020
@jbrockmendel jbrockmendel added the setops union, intersection, difference, symmetric_difference label Jun 17, 2021
@mroeschke mroeschke added Enhancement and removed Index Related to the Index class or subclasses Reshaping Concat, Merge/Join, Stack/Unstack, Explode labels Jun 25, 2021
@mroeschke mroeschke removed this from the Contributions Welcome milestone Oct 13, 2022
@jbrockmendel
Copy link
Member

The set ops all have sort keyword. Closing as complete.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API - Consistency Internal Consistency of API/Behavior Enhancement setops union, intersection, difference, symmetric_difference
Projects
None yet
Development

No branches or pull requests

6 participants