CLN deprecate save&load in favour of to_pickle&read_pickle by hayd · Pull Request #3787 · pandas-dev/pandas (original) (raw)
How it's working:
In [1]: df = pd.DataFrame()
In [2]: df.save('path')
pandas/core/generic.py:42: FutureWarning: save is deprecated and will be removed in v0.12, use to_pickle
warnings.warn("save is deprecated and will be removed in v0.12, use to_pickle", FutureWarning)
In [3]: pd.save(df, 'path')
pandas/core/common.py:2098: FutureWarning: save is deprecated and will be removed in v0.12, use obj.to_pickle
warnings.warn("save is deprecated and will be removed in v0.12, use obj.to_pickle", FutureWarning)
In [4]: df.to_pickle('path') # the new way
In [9]: pd.to_pickle # not a way
AttributeError: 'module' object has no attribute 'to_pickle'
In [5]: pd.load('path')
pandas/core/common.py:2083: FutureWarning: load is deprecated and will be removed in v0.12, use obj.read_pickle
warnings.warn("load is deprecated and will be removed in v0.12, use read_pickle", FutureWarning)
Out[5]:
Empty DataFrame
Columns: []
Index: []
In [6]: df.load('path')
pandas/core/generic.py:48: FutureWarning: load is deprecated and will be removed in v0.12, use pd.read_pickle
warnings.warn("load is deprecated and will be removed in v0.12, use pd.read_pickle", FutureWarning)
Out[6]:
Empty DataFrame
Columns: []
Index: []
In [7]: pd.read_pickle('path') # the new way
Out[7]:
Empty DataFrame
Columns: []
Index: []
In [8]: df.read_pickle('path') # not a way
AttributeError: 'DataFrame' object has no attribute 'read_pickle'
I still have to fiddle around with the docs a little (I've probably missed some things), and then will squash.