Skip to content

Commit 460ca0c

Browse files
committed
Shortened paragraph addded in 'whatsnew'.
1 parent 352220b commit 460ca0c

File tree

1 file changed

+1
-20
lines changed

1 file changed

+1
-20
lines changed

doc/source/whatsnew/v0.21.0.txt

+1-20
Original file line numberDiff line numberDiff line change
@@ -30,26 +30,7 @@ Other Enhancements
3030
Pickle file I/O protocol parameter
3131
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
3232

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.
5334

5435
.. _whatsnew_0210.api_breaking:
5536

0 commit comments

Comments
 (0)