Skip to content

Commit 8fe9ccd

Browse files
committed
BUG: Remove special-casing for Python date objects in DatetimeIndex
1 parent 07e3114 commit 8fe9ccd

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pandas/core/indexes/base.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6317,8 +6317,10 @@ def _is_comparable_dtype(self, dtype: DtypeObj) -> bool:
63176317
if dtype.kind != "M":
63186318
if self.dtype.kind == "m" and pa.types.is_duration(pa_dtype):
63196319
return True
6320+
if self.dtype.kind == "O":
6321+
return True
63206322
return False
6321-
if self.dtype.kind != "M":
6323+
if self.dtype.kind != "M" and self.dtype.kind != "O":
63226324
return False
63236325
if pa.types.is_date(pa_dtype):
63246326
return False

0 commit comments

Comments
 (0)