Skip to content

Commit 4f73e9b

Browse files
committed
BUG: fixes indexing with monotonic decreasing DTI (pandas-dev#19362)
1 parent fa231e8 commit 4f73e9b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pandas/core/indexes/datetimelike.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -342,7 +342,7 @@ def _format_with_header(self, header, **kwargs):
342342
def __contains__(self, key):
343343
try:
344344
res = self.get_loc(key)
345-
return is_scalar(res) or type(res) == slice or np.any(res)
345+
return is_scalar(res) or type(res) == slice or np.any(res+1)
346346
except (KeyError, TypeError, ValueError):
347347
return False
348348

0 commit comments

Comments
 (0)