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

DEPR: |&^ as set operations for Index #36758

Closed
jbrockmendel opened this issue Oct 1, 2020 · 3 comments · Fixed by #37374
Closed

DEPR: |&^ as set operations for Index #36758

jbrockmendel opened this issue Oct 1, 2020 · 3 comments · Fixed by #37374
Labels
Deprecate Functionality to remove in pandas
Milestone

Comments

@jbrockmendel
Copy link
Member

It isn't that burdensome to write left.union(right) instead of left | right, and deprecating this special-case behavior allow us to fully share the implementation with Series.

@jbrockmendel jbrockmendel added Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 1, 2020
@rohitkg98
Copy link
Contributor

Code might get a bit more verbose when chaining operators. for eg:

first | second | third

vs

first.union(second).union(third)

Even more so with other operators:

first & second & third

vs

first.intersection(second).intersection(third)
first ^ second ^ third

vs

first.symmetric_difference(second).symmetric_difference(third)

sounds fine otherwise. Happy to make a PR if we do decide on deprecating.

@jbrockmendel jbrockmendel added Deprecate Functionality to remove in pandas and removed Bug Needs Triage Issue that has not been reviewed by a pandas team member labels Oct 12, 2020
@jreback jreback added this to the 1.2 milestone Oct 24, 2020
@jorisvandenbossche
Copy link
Member

Previous round of discussions related to this: #8226 (when we deprecated + and - as set operations, but decided to keep &, | and ^)

@jbrockmendel
Copy link
Member Author

@jorisvandenbossche do you feel strongly about keeping the status quo?

In #8226 it looks like you initially suggested doing this, @jreback said "I don't think this should change (you are right can reevaluate in the future)", @immerrr seemed on board with this, and @shoyer saw upsides either way.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Deprecate Functionality to remove in pandas
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants