@@ -49,19 +49,19 @@ def to_pickle(
4949 object implementing a binary ``write()`` function.
5050 Also accepts URL. URL has to be of S3 or GCS.
5151 compression : str or dict, default 'infer'
52- For on-the-fly compression of the output data. If 'infer' and 'filepath_or_buffer' is
53- path-like, then detect compression from the following extensions: '.gz',
54- '.bz2', '.zip ', '.xz ', '.zst ', '.tar ', '.tar.gz ', '.tar.xz' or '.tar.bz2'
55- (otherwise no compression).
52+ For on-the-fly compression of the output data. If 'infer' and
53+ 'filepath_or_buffer' is path-like, then detect compression from the
54+ following extensions: '.gz ', '.bz2 ', '.zip ', '.xz ', '.zst ', '.tar',
55+ '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression).
5656 Set to ``None`` for no compression.
5757 Can also be a dict with key ``'method'`` set
58- to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and
59- other key-value pairs are forwarded to
58+ to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``,
59+ ``'tar'``} and other key-value pairs are forwarded to
6060 ``zipfile.ZipFile``, ``gzip.GzipFile``,
6161 ``bz2.BZ2File``, ``zstandard.ZstdCompressor``, ``lzma.LZMAFile`` or
6262 ``tarfile.TarFile``, respectively.
63- As an example, the following could be passed for faster compression and to create
64- a reproducible gzip archive:
63+ As an example, the following could be passed for faster compression
64+ and to create a reproducible gzip archive:
6565 ``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.
6666
6767 .. versionadded:: 1.5.0
@@ -151,20 +151,21 @@ def read_pickle(
151151 object implementing a binary ``readlines()`` function.
152152 Also accepts URL. URL is not limited to S3 and GCS.
153153 compression : str or dict, default 'infer'
154- For on-the-fly decompression of on-disk data. If 'infer' and 'filepath_or_buffer' is
155- path-like, then detect compression from the following extensions: '.gz',
156- '.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2'
157- (otherwise no compression).
158- If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in.
154+ For on-the-fly decompression of on-disk data. If 'infer' and
155+ 'filepath_or_buffer' is path-like, then detect compression from the
156+ following extensions: '.gz', '.bz2', '.zip', '.xz', '.zst', '.tar',
157+ '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression).
158+ If using 'zip' or 'tar', the ZIP file must contain only one data file
159+ to be read in.
159160 Set to ``None`` for no decompression.
160161 Can also be a dict with key ``'method'`` set
161- to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and
162- other key-value pairs are forwarded to
162+ to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``,
163+ ``'tar'``} and other key-value pairs are forwarded to
163164 ``zipfile.ZipFile``, ``gzip.GzipFile``,
164165 ``bz2.BZ2File``, ``zstandard.ZstdDecompressor``, ``lzma.LZMAFile`` or
165166 ``tarfile.TarFile``, respectively.
166- As an example, the following could be passed for Zstandard decompression using a
167- custom compression dictionary:
167+ As an example, the following could be passed for Zstandard decompression
168+ using a custom compression dictionary:
168169 ``compression={'method': 'zstd', 'dict_data': my_compression_dict}``.
169170
170171 .. versionadded:: 1.5.0
0 commit comments