File tree 1 file changed +6
-2
lines changed
1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -404,13 +404,17 @@ def isin(comps, values):
404
404
if not isinstance (values , (ABCIndex , ABCSeries , np .ndarray )):
405
405
values = construct_1d_object_array_from_listlike (list (values ))
406
406
407
- from pandas .core .dtypes .common import is_datetimelike
407
+ from pandas .core .dtypes .common import is_datetimelike , is_float
408
408
comps , dtype , _ = _ensure_data (comps )
409
- # Convert `values` to `dtype` if `values` is datetime-like and `dtype` is datetime-like
409
+ # Convert `values` to `dtype` if `values` is datetime/float -like and `dtype` is datetime/float -like
410
410
if (is_datetime_or_timedelta_dtype (dtype ) and
411
411
(is_datetime_or_timedelta_dtype (values ) or
412
412
all (is_datetimelike (i ) for i in values ))):
413
413
values , _ , _ = _ensure_data (values , dtype = dtype )
414
+ elif (is_float_dtype (dtype ) and
415
+ (is_float_dtype (values ) or
416
+ all (is_float (i ) for i in values ))):
417
+ values , _ , _ = _ensure_data (values , dtype = dtype )
414
418
else :
415
419
values , _ , _ = _ensure_data (values )
416
420
You can’t perform that action at this time.
0 commit comments