Pandas Series: to_pickle() function
Series-to_pickle() function
Pickle (serialize) object to file.
Syntax:
Series.to_pickle(self, path, compression='infer', protocol=4)
Parameters:
Name | Description | Type/Default Value | Required / Optional |
---|---|---|---|
path | File path where the pickled object will be stored | str | Required |
compression | A string representing the compression to use in the output file. By default, infers from the file extension in specified path. | {‘infer’, ‘gzip’, ‘bz2’, ‘zip’, ‘xz’, None}, default ‘infer’ | Required |
protocol | Int which indicates which protocol should be used by the pickler, default HIGHEST_PROTOCOL. The possible values are 0, 1, 2, 3, 4. A negative value for the protocol parameter is equivalent to setting its value to HIGHEST_PROTOCOL. | int | Required |
Example:
Download the Pandas Series Notebooks from here.
Previous: Series-plot.pie() function
Next: Series-to_csv() function
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework