We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 2e6764c commit 8ff37c6Copy full SHA for 8ff37c6
pandas/core/indexes/base.py
@@ -6307,15 +6307,13 @@ def _is_comparable_dtype(self, dtype: DtypeObj) -> bool:
6307
elif isinstance(dtype, ArrowDtype):
6308
import pyarrow as pa
6309
6310
- if dtype.kind != "M":
+ if self.dtype.kind != "M" or dtype.kind != "M":
6311
return False
6312
pa_dtype = dtype.pyarrow_dtype
6313
if pa.types.is_date(pa_dtype):
6314
6315
if pa.types.is_timestamp(pa_dtype):
6316
- if (getattr(pa_dtype, "tz", None) is None) ^ (
6317
- getattr(self, "tz", None) is None
6318
- ):
+ if (pa_dtype.tz is None) ^ (getattr(self, "tz", None) is None):
6319
6320
return True
6321
# TODO: this was written assuming we only get here with object-dtype,
0 commit comments