-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix get_indexer_non_unique with CategoricalIndex key #21457
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment. merge when on green.
pandas/core/indexes/category.py
Outdated
@@ -598,7 +598,11 @@ def get_indexer_non_unique(self, target): | |||
target = ibase._ensure_index(target) | |||
|
|||
if isinstance(target, CategoricalIndex): | |||
target = target.categories | |||
if target.categories is self.categories: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you add a comment here about what you are doing (e.g. why this conditional)
d5aee5c
to
2296f17
Compare
Codecov Report
@@ Coverage Diff @@
## master #21457 +/- ##
==========================================
+ Coverage 91.89% 91.9% +<.01%
==========================================
Files 153 153
Lines 49600 49606 +6
==========================================
+ Hits 45580 45589 +9
+ Misses 4020 4017 -3
Continue to review full report at Codecov.
|
2296f17
to
85f0c70
Compare
git diff upstream/master -u -- "*.py" | flake8 --diff