We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3b66275 commit 21569bbCopy full SHA for 21569bb
pandas/core/algorithms.py
@@ -32,6 +32,7 @@
32
from pandas.core import common as com
33
from pandas._libs import algos, lib, hashtable as htable
34
from pandas._libs.tslib import iNaT
35
+from pandas._libs.tslibs.timestamps import Timestamp
36
37
38
# --------------- #
@@ -414,7 +415,8 @@ def isin(comps, values):
414
415
all(is_float(i) for i in values)))
416
check_datetime = (is_datetime_or_timedelta_dtype(dtype) and
417
(is_datetime_or_timedelta_dtype(values) or
- all(is_datetimelike(i) for i in values)))
418
+ all(is_datetimelike(i) for i in values) or
419
+ all(isinstance(i, Timestamp) for i in values)))
420
if check_int or check_float or check_datetime:
421
values, _, _ = _ensure_data(values, dtype=dtype)
422
else:
0 commit comments