Skip to content

Commit e8ac38a

Browse files
committed
BUG: Add fix for hashing timestamps with folds
1 parent 9512393 commit e8ac38a

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

pandas/_libs/tslibs/timestamps.pyx

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -180,6 +180,8 @@ cdef class _Timestamp(ABCTimestamp):
180180
def __hash__(_Timestamp self):
181181
if self.nanosecond:
182182
return hash(self.value)
183+
if self.fold:
184+
return datetime.__hash__(self.replace(fold=0))
183185
return datetime.__hash__(self)
184186

185187
def __richcmp__(_Timestamp self, object other, int op):

0 commit comments

Comments
 (0)