Skip to content

Commit 0468e5f

Browse files
committed
add tarfile to shared compression docs
1 parent e3369aa commit 0468e5f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

pandas/core/shared_docs.py

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -407,11 +407,11 @@
407407
] = """compression : str or dict, default 'infer'
408408
For on-the-fly compression of the output data. If 'infer' and '%s'
409409
path-like, then detect compression from the following extensions: '.gz',
410-
'.bz2', '.zip', '.xz', or '.zst' (otherwise no compression). Set to
410+
'.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression). Set to
411411
``None`` for no compression. Can also be a dict with key ``'method'`` set
412-
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``} and other
412+
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other
413413
key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``,
414-
``bz2.BZ2File``, or ``zstandard.ZstdDecompressor``, respectively. As an
414+
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an
415415
example, the following could be passed for faster compression and to create
416416
a reproducible gzip archive:
417417
``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``."""
@@ -421,12 +421,12 @@
421421
] = """compression : str or dict, default 'infer'
422422
For on-the-fly decompression of on-disk data. If 'infer' and '%s' is
423423
path-like, then detect compression from the following extensions: '.gz',
424-
'.bz2', '.zip', '.xz', or '.zst' (otherwise no compression). If using
425-
'zip', the ZIP file must contain only one data file to be read in. Set to
424+
'.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression). If using
425+
'zip' or 'tar', the ZIP file must contain only one data file to be read in. Set to
426426
``None`` for no decompression. Can also be a dict with key ``'method'`` set
427-
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``} and other
427+
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other
428428
key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``,
429-
``bz2.BZ2File``, or ``zstandard.ZstdDecompressor``, respectively. As an
429+
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an
430430
example, the following could be passed for Zstandard decompression using a
431431
custom compression dictionary:
432432
``compression={'method': 'zstd', 'dict_data': my_compression_dict}``."""

0 commit comments

Comments
 (0)