-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
ENH: Add support for ea dtypes in merge #49876
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
# Conflicts: # pandas/_libs/hashtable.pyi # pandas/_libs/hashtable.pyx # pandas/_libs/hashtable_class_helper.pxi.in # pandas/core/reshape/merge.py
dtype = find_common_type([lk.dtype, rk.dtype]) | ||
if isinstance(dtype, ExtensionDtype): | ||
cls = dtype.construct_array_type() | ||
if not isinstance(lk, ExtensionArray): |
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.
Instead of all of the if checks can we set up another function or class to dispatch to that handles this more gracefully? I think ideally could also eliminate the need for the factorizer dict
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.
Sure, but would prefer to do this as a follow up.
Getting rid of the dict is probably not easy if doable at all
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.
If not for the dict at least all these if checks I think should be wrapped in a separate function. We are losing a good bit of abstraction here compared to the previous code
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.
Yep this makes sense, but as I said would prefer doing this as a follow up.
ASV failures might be real
|
Oh interesting, I’ll rerun them locally to check, they were passing at some point |
overflow error, removed them since a useful test is not possible |
|
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 merge when ready @WillAyd
Thanks @phofl |
Thx, will open a pr to refactor tomorrow |
doc/source/whatsnew/vX.X.X.rst
file if fixing a bug or adding a new feature.