Skip to content

Commit c14b45f

Browse files
committed
fix unpickling
1 parent 7ab2a74 commit c14b45f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

pandas/core/dtypes/dtypes.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -601,9 +601,10 @@ def __eq__(self, other):
601601
self.unit == other.unit and
602602
str(self.tz) == str(other.tz))
603603

604-
def __getstate__(self):
604+
def __setstate__(self, state):
605605
# for pickle compat.
606-
return self.__dict__
606+
self._tz = state['tz']
607+
self._unit = state['unit']
607608

608609

609610
class PeriodDtype(ExtensionDtype, PandasExtensionDtype):

0 commit comments

Comments
 (0)