|
49 | 49 | from pandas import compat
|
50 | 50 | from pandas.compat.numpy import function as nv
|
51 | 51 | from pandas.compat import (map, zip, lzip, lrange, string_types,
|
52 |
| - isidentifier, set_function_name) |
53 |
| -from pandas.compat import cPickle as pkl |
| 52 | + isidentifier, set_function_name, cPickle as pkl) |
54 | 53 | import pandas.core.nanops as nanops
|
55 | 54 | from pandas.util.decorators import Appender, Substitution, deprecate_kwarg
|
56 | 55 | from pandas.util.validators import validate_bool_kwarg
|
@@ -1356,11 +1355,17 @@ def to_pickle(self, path, compression='infer',
|
1356 | 1355 | File path
|
1357 | 1356 | compression : {'infer', 'gzip', 'bz2', 'xz', None}, default 'infer'
|
1358 | 1357 | a string representing the compression to use in the output file
|
| 1358 | +
|
| 1359 | + .. versionadded:: 0.20.0 |
1359 | 1360 | protocol : int
|
1360 | 1361 | Int which indicates which protocol should be used by the pickler,
|
1361 |
| - default HIGHEST_PROTOCOL (Pickle module). |
| 1362 | + default HIGHEST_PROTOCOL (Pickle module). The possible values for |
| 1363 | + this parameter depend on the version of Python. For Python 2.x, |
| 1364 | + possible values are 0, 1, 2. For Python>=3.0, 3 is a valid value. |
| 1365 | + For Python >= 3.4, 4 is a valid value. |
| 1366 | +
|
| 1367 | + .. versionadded:: 0.21.0 |
1362 | 1368 |
|
1363 |
| - .. versionadded:: 0.20.0 |
1364 | 1369 | """
|
1365 | 1370 | from pandas.io.pickle import to_pickle
|
1366 | 1371 | return to_pickle(self, path, compression=compression,
|
|
0 commit comments