Skip to content

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

Merged
merged 25 commits into from
Aug 22, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
little stuff
  • Loading branch information
ianzur committed Jul 31, 2019
commit e5456ac95919cc6b9a3851cfd53c86ae56ca72d1
2 changes: 1 addition & 1 deletion doc/source/whatsnew/v0.25.1.rst
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ Datetimelike

Timedelta
^^^^^^^^^

-
-
-
Expand Down
2 changes: 1 addition & 1 deletion pandas/core/reshape/merge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1636,7 +1636,7 @@ def _get_merge_keys(self):
)
)

if(
if (
is_datetime64_dtype(lt)
or is_datetime64tz_dtype(lt)
or is_timedelta64_dtype(lt)
Expand Down
4 changes: 2 additions & 2 deletions pandas/tests/reshape/merge/test_merge_asof.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import numpy as np
import datetime
import numpy as np
import pytest
import pytz

Expand Down Expand Up @@ -1283,7 +1283,7 @@ def test_timedelta_tolerance_nearest(self):
)

result = pd.merge_asof(
left, right, on="time", tolerance=pd.Timedelta("1ms"), direction="nearest"
left, right, on="time", tolerance=Timedelta("1ms"), direction="nearest"
)

assert_frame_equal(result, expected)