-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
BUG: merge_asof raising KeyError for extension dtypes #53458
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: merge_asof raising KeyError for extension dtypes #53458
Conversation
|
||
pa_type = self._pa_array.type | ||
assert pa.types.is_timestamp(pa_type) | ||
np_dtype = np.dtype(f"M8[{pa_type.unit}]") |
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.
IIRC we do something like the below in another area of this file correct? If so can we reuse?
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.
yes, updated a few locations to reuse these methods.
Thanks @lukemanley |
* fix merge_asof raising KeyError for extension dtypes * reuse new methods elsewhere
* fix merge_asof raising KeyError for extension dtypes * reuse new methods elsewhere
@lukemanley thanks for fixing. I was wondering, do you expect it to work for timezone aware pyarrow timestamps eg |
@0x26res - yes, tz-aware pyarrow timestamps should work in pandas 2.1 (to be released later this month):
|
doc/source/whatsnew/v2.1.0.rst
file if fixing a bug or adding a new feature.