Skip to content

REF: unify Index union methods #38382

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 8 commits into from
Dec 14, 2020
Merged

Conversation

jbrockmendel
Copy link
Member

  • closes #xxxx
  • tests added / passed
  • passes black pandas
  • passes git diff upstream/master -u -- "*.py" | flake8 --diff
  • whatsnew entry

Sits on top of #38373 which focuses on intersection.

@simonjayhawkins this changes corner-case behavior for IntervalIndex.union, which we already changed in #38282 for 1.2.0. I think this is unambiguously More Correct. Question for you: should we try to get it in to 1.2.0 to avoid back-to-back behavior changes?

Copy link
Contributor

@jreback jreback left a comment

Choose a reason for hiding this comment

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

looks fine, i think still need to test the reverse case.

is there sufficient testing on the float/int combinations here?

expected = other
tm.assert_index_equal(result, expected)

other = empty_index(dtype="uint64", closed=closed)
Copy link
Contributor

Choose a reason for hiding this comment

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

test the reverse as well

@jreback jreback added Index Related to the Index class or subclasses Refactor Internal refactoring of code labels Dec 13, 2020
@jreback jreback added this to the 1.3 milestone Dec 13, 2020
@jreback jreback merged commit 2fadd59 into pandas-dev:master Dec 14, 2020
@jbrockmendel jbrockmendel deleted the ref-setops-49 branch December 14, 2020 16:15
luckyvs1 pushed a commit to luckyvs1/pandas that referenced this pull request Jan 20, 2021
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 Refactor Internal refactoring of code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants