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

BUG: name retention in Index.intersection #38111

Merged
merged 13 commits into from
Dec 2, 2020

Conversation

jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Nov 27, 2020

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

its going to take a few passes to get the behavior consistent across all subclasses. once done, we can de-duplicate the boilerplate.

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.

likley will conflict with #36927 looks ok at a glance

@jreback jreback added Bug Constructors Series/DataFrame/Index/pd.array Constructors Index Related to the Index class or subclasses MultiIndex labels Nov 28, 2020
@jreback
Copy link
Contributor

jreback commented Nov 28, 2020

pls add a whatsnew as well

@jbrockmendel
Copy link
Member Author

whatsnew added + greenish (the same test_area_lim)

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.

pls merge master


if self.equals(other):
return self._get_reconciled_name_object(other)

return self._intersection(other, sort=sort)

def _intersection(self, other, sort=False):
Copy link
Contributor

Choose a reason for hiding this comment

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

type if you can (doc-string if needed)

pandas/core/indexes/interval.py Show resolved Hide resolved
@jreback jreback merged commit 7e2aa42 into pandas-dev:master Dec 2, 2020
@jbrockmendel jbrockmendel deleted the bug-setops-2 branch December 2, 2020 01:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Constructors Series/DataFrame/Index/pd.array Constructors Index Related to the Index class or subclasses MultiIndex
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants