File tree Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Expand file tree Collapse file tree 1 file changed +4
-6
lines changed Original file line number Diff line number Diff line change @@ -6290,6 +6290,10 @@ def _should_compare(self, other: Index) -> bool:
62906290 # respectively.
62916291 return False
62926292
6293+ # GH#62158
6294+ if self .dtype .kind == "M" and other .inferred_type == "date" :
6295+ return False
6296+
62936297 dtype = _unpack_nested_dtype (other )
62946298 return (
62956299 self ._is_comparable_dtype (dtype )
@@ -6311,12 +6315,6 @@ def _is_comparable_dtype(self, dtype: DtypeObj) -> bool:
63116315
63126316 pa_dtype = dtype .pyarrow_dtype
63136317 if dtype .kind != "M" :
6314- if self .dtype .kind == "b" :
6315- return dtype .kind == "b"
6316- if is_numeric_dtype (self .dtype ):
6317- return pa .types .is_integer (pa_dtype ) or pa .types .is_floating (
6318- pa_dtype
6319- )
63206318 if self .dtype .kind == "m" and pa .types .is_duration (pa_dtype ):
63216319 return True
63226320 return False
You can’t perform that action at this time.
0 commit comments