File tree 1 file changed +1
-20
lines changed
1 file changed +1
-20
lines changed Original file line number Diff line number Diff line change @@ -30,26 +30,7 @@ Other Enhancements
30
30
Pickle file I/O protocol parameter
31
31
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
32
32
33
- :func:`to_pickle` now allows to specify the protocol used by the Pickler.
34
- The 'protocol' parameter defaults to HIGHEST_PROTOCOL. For Python 2.x, HIGHEST_PROTOCOL is 2.
35
- Since Python 3.0 (respectively 3.4), HIGHEST_PROTOCOL is 3 (respectively 4).
36
- A negative value for the protocol parameter is equivalent to setting its value to HIGHEST_PROTOCOL.
37
-
38
- .. ipython:: python
39
-
40
- df = pd.DataFrame({
41
- 'A': np.random.randn(1000),
42
- 'B': 'foo',
43
- 'C': pd.date_range('20130101', periods=1000, freq='s')})
44
-
45
- Using an explicit protocol parameter
46
-
47
- .. ipython:: python
48
-
49
- df.to_pickle("data.pkl", protocol=2)
50
- rt = pd.read_pickle("data.pkl")
51
- rt
52
-
33
+ - Added protocol parameter to :func:`to_pickle`. The 'protocol' parameter defaults to HIGHEST_PROTOCOL.
53
34
54
35
.. _whatsnew_0210.api_breaking:
55
36
You can’t perform that action at this time.
0 commit comments