/pandas 0.22


DataFrame.to_pickle(path, compression='infer', protocol=4) [source]

Pickle (serialize) object to input file path.


path : string

File path

compression : {‘infer’, ‘gzip’, ‘bz2’, ‘xz’, None}, default ‘infer’

a string representing the compression to use in the output file

New in version 0.20.0.

protocol : int

Int which indicates which protocol should be used by the pickler, default HIGHEST_PROTOCOL (see [1], paragraph 12.1.2). The possible values for this parameter depend on the version of Python. For Python 2.x, possible values are 0, 1, 2. For Python>=3.0, 3 is a valid value. For Python >= 3.4, 4 is a valid value.A negative value for the protocol parameter is equivalent to setting its value to HIGHEST_PROTOCOL.



New in version 0.21.0.

© 2008–2012, AQR Capital Management, LLC, Lambda Foundry, Inc. and PyData Development Team
Licensed under the 3-clause BSD License.