Skip to content

Commit d027e3b

Browse files
committed
API: Fixed pickle
1 parent 0eea67d commit d027e3b

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

pandas/core/categorical.py

+5
Original file line numberDiff line numberDiff line change
@@ -1051,6 +1051,11 @@ def __setstate__(self, state):
10511051
else:
10521052
state['_ordered'] = False
10531053

1054+
# 0.21.0 CategoricalDtype change
1055+
if '_dtype' not in state:
1056+
state['_dtype'] = CategoricalDtype(state['_categories'],
1057+
state['_ordered'])
1058+
10541059
for k, v in compat.iteritems(state):
10551060
setattr(self, k, v)
10561061

pandas/io/pickle.py

-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,6 @@ def read_pickle(path, compression='infer'):
7474
"""
7575
path = _stringify_path(path)
7676
inferred_compression = _infer_compression(path, compression)
77-
# import pdb; pdb.set_trace()
7877

7978
def read_wrapper(func):
8079
# wrapper file handle open/close operation

0 commit comments

Comments
 (0)