Skip to content

Commit 8168b90

Browse files
leifwalshjreback
authored andcommitted
ENH: improve 'incompatible tolerance' error message in merge_asof
1 parent d8129b4 commit 8168b90

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

pandas/core/reshape/merge.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1268,8 +1268,8 @@ def _get_merge_keys(self):
12681268
else:
12691269
lt = left_join_keys[-1]
12701270

1271-
msg = "incompatible tolerance, must be compat " \
1272-
"with type {lt}".format(lt=type(lt))
1271+
msg = "incompatible tolerance {0}, must be compat " \
1272+
"with type {1}".format(type(tolerance), lt.dtype)
12731273

12741274
if is_datetime64_dtype(lt) or is_datetime64tz_dtype(lt):
12751275
if not isinstance(self.tolerance, Timedelta):

0 commit comments

Comments
 (0)