Skip to content

Commit 3b38f8d

Browse files
committed
BUG: Remove special-casing for Python date objects in DatetimeIndex
1 parent 0f7f3b8 commit 3b38f8d

File tree

1 file changed

+0
-13
lines changed

1 file changed

+0
-13
lines changed

pandas/core/indexes/base.py

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
from collections import abc
44
from datetime import (
5-
date,
65
datetime,
76
)
87
import functools
@@ -6291,18 +6290,6 @@ def _should_compare(self, other: Index) -> bool:
62916290
# respectively.
62926291
return False
62936292

6294-
# GH#62158
6295-
if (
6296-
self.dtype.kind == "M"
6297-
and isinstance(other, Index)
6298-
and other.dtype == _dtype_obj
6299-
and all(
6300-
isinstance(x, date) and not isinstance(x, datetime)
6301-
for x in other._values
6302-
)
6303-
):
6304-
return False
6305-
63066293
dtype = _unpack_nested_dtype(other)
63076294
return (
63086295
self._is_comparable_dtype(dtype)

0 commit comments

Comments
 (0)