-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
issue #27642 - timedelta merge asof with tolerance #27650
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
Changes from 2 commits
533d407
431da66
c9acc09
76f6525
fd1dbb2
63b7a2b
84759ac
04c18e9
ac76918
0a0c5c8
a26bb71
a0ba5d9
e5456ac
4f56dc4
52193a4
7c004c9
3f8bf2b
8f8aeb3
f66fce4
0eb173f
4a1c515
6daf823
3688986
f6009ca
6f7151d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
@@ -35,6 +35,7 @@ | |||||||||||||||
is_number, | ||||||||||||||||
is_numeric_dtype, | ||||||||||||||||
is_object_dtype, | ||||||||||||||||
is_timedelta64_dtype, | ||||||||||||||||
needs_i8_conversion, | ||||||||||||||||
) | ||||||||||||||||
from pandas.core.dtypes.missing import isnull, na_value_for_dtype | ||||||||||||||||
|
@@ -1635,7 +1636,11 @@ def _get_merge_keys(self): | |||||||||||||||
) | ||||||||||||||||
) | ||||||||||||||||
|
||||||||||||||||
if is_datetime64_dtype(lt) or is_datetime64tz_dtype(lt): | ||||||||||||||||
if( | ||||||||||||||||
is_datetime64_dtype(lt) | ||||||||||||||||
or is_datetime64tz_dtype(lt) | ||||||||||||||||
or is_timedelta64_dtype(lt) | ||||||||||||||||
): | ||||||||||||||||
if not isinstance(self.tolerance, Timedelta): | ||||||||||||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This should probably be There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. see commit "mroeschke: this test is for you 🚀" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. the test fails There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think we'll need a different PR for this test I think, it fails at this conversion check. pandas/pandas/core/reshape/merge.py Lines 1704 to 1710 in 143bc34
With tolerance = datetime.timedelta -> ERROR: has no attribute "value" There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Another check and conversion is necessary to convert There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Okay thanks for investigating. Yes, I'd be great to address in another issues/PR. |
||||||||||||||||
raise MergeError(msg) | ||||||||||||||||
if self.tolerance < Timedelta(0): | ||||||||||||||||
|
Uh oh!
There was an error while loading. Please reload this page.