-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
BUG: fix in categorical merges #32079
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
… for categorical joins
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.
I think OK generally but @TomAugspurger for any more thoughts.
Does this affect other index types like DTI as well?
pandas/core/indexes/category.py
Outdated
@@ -781,6 +782,10 @@ def _delegate_method(self, name: str, *args, **kwargs): | |||
return res | |||
return CategoricalIndex(res, name=self.name) | |||
|
|||
def _wrap_joined_index(self, joined, other): |
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 annotate this? Should do that for any new development
It doesn't affect DTI, as DTI inherits from DateTimedeltaMixin:
and DateTimedeltaMixin already has its own |
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.
lgtm ex @jbrockmendel question
@jbrockmendel have added a test which covers the int16_t case:
The current test fails on master (for both cases, we get
|
comment requested, otherwise LGTM |
Thanks @MarcoGorelli ! |
test adapted (at this point kind of loosely) from #28296
black pandas
git diff upstream/master -u -- "*.py" | flake8 --diff