Skip to content

TYPO: IntervalIndex.symmetric_differnce -> IntervalIndex.symmetric_difference #18476

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 2 commits into from
Nov 26, 2017

Conversation

jschendel
Copy link
Member

Before this, IntervalIndex.symmetric_difference hit the base class implementation, and appeared to generally be working, albeit without full error handling and with worse performance than the intended implementation.

Also went through and did some more work on the tests:

  • expanded the test_set_operation_errors, since this didn't have full coverage of all set ops prior.
  • self.create_index previous only created an index with two elements, which seemed kind of small; increased this to 10 elements, and updated impacted tests accordingly.
  • added a fixture for parameterizing over name, and updated a few tests to use this.

@codecov
Copy link

codecov bot commented Nov 25, 2017

Codecov Report

Merging #18476 into master will increase coverage by 0.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #18476      +/-   ##
==========================================
+ Coverage    91.3%   91.31%   +0.01%     
==========================================
  Files         163      163              
  Lines       49781    49781              
==========================================
+ Hits        45451    45456       +5     
+ Misses       4330     4325       -5
Flag Coverage Δ
#multiple 89.11% <100%> (+0.01%) ⬆️
#single 40.72% <100%> (ø) ⬆️
Impacted Files Coverage Δ
pandas/core/indexes/interval.py 93.56% <100%> (+0.86%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 38f41e6...9f6411b. Read the comment docs.

@jreback jreback added Bug Interval Interval data type labels Nov 25, 2017
@jreback jreback modified the milestone: 0.22.0 Nov 25, 2017
@@ -73,7 +73,7 @@ Indexing
- Bug in a boolean comparison of a ``datetime.datetime`` and a ``datetime64[ns]`` dtype Series (:issue:`17965`)
- Bug where a ``MultiIndex`` with more than a million records was not raising ``AttributeError`` when trying to access a missing attribute (:issue:`18165`)
- Bug in :class:`IntervalIndex` constructor when a list of intervals is passed with non-default ``closed`` (:issue:`18334`)
-
- Bug in ``IntervalIndex.symmetric_difference()`` where the symmetric difference with a non-``IntervalIndex`` did not raise (:issue:`18475`)
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to 0.22. I am not sure we can backport the actual test changes w/o causing some hassle.

Alternatively you can split this to 2 pr's, 1 the test changes and 1 the perf fix (which we can backport).

Copy link
Member Author

Choose a reason for hiding this comment

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

Moved to 0.22.0

@jreback jreback added this to the 0.22.0 milestone Nov 26, 2017
@jreback jreback merged commit b08c22b into pandas-dev:master Nov 26, 2017
@jreback
Copy link
Contributor

jreback commented Nov 26, 2017

thanks @jschendel

@jschendel jschendel deleted the iv-idx-sym-diff branch December 4, 2017 20:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Interval Interval data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

IntervalIndex.symmetric_difference doesn't handle a non-IntervalIndex correctly
2 participants