Skip to content

Commit c4ff5e2

Browse files
committed
BUG: Remove special-casing for Python date objects in DatetimeIndex
1 parent 48595e1 commit c4ff5e2

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/core/indexes/base.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6310,6 +6310,8 @@ def _is_comparable_dtype(self, dtype: DtypeObj) -> bool:
63106310
import pyarrow as pa
63116311

63126312
pa_dtype = dtype.pyarrow_dtype
6313+
if self.dtype.kind != "M" or dtype.kind != "M":
6314+
return False
63136315
if pa.types.is_date(pa_dtype):
63146316
return False
63156317
if pa.types.is_timestamp(pa_dtype):

0 commit comments

Comments
 (0)