Skip to content

Commit 2531ee0

Browse files
committed
fix formatting
1 parent 0468e5f commit 2531ee0

File tree

2 files changed

+20
-12
lines changed

2 files changed

+20
-12
lines changed

pandas/core/shared_docs.py

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -407,12 +407,16 @@
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', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression). Set to
411-
``None`` for no compression. Can also be a dict with key ``'method'`` set
410+
'.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2'
411+
(otherwise no compression).
412+
Set to ``None`` for no compression.
413+
Can also be a dict with key ``'method'`` set
412414
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other
413-
key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``,
414-
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an
415-
example, the following could be passed for faster compression and to create
415+
key-value pairs are forwarded to
416+
``zipfile.ZipFile``, ``gzip.GzipFile``,
417+
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or
418+
``tarfile.TarFile``, respectively.
419+
As an example, the following could be passed for faster compression and to create
416420
a reproducible gzip archive:
417421
``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``."""
418422

@@ -421,13 +425,17 @@
421425
] = """compression : str or dict, default 'infer'
422426
For on-the-fly decompression of on-disk data. If 'infer' and '%s' is
423427
path-like, then detect compression from the following extensions: '.gz',
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
426-
``None`` for no decompression. Can also be a dict with key ``'method'`` set
428+
'.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2'
429+
(otherwise no compression).
430+
If using 'zip' or 'tar', the ZIP file must contain only one data file to be read in.
431+
Set to ``None`` for no decompression.
432+
Can also be a dict with key ``'method'`` set
427433
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'tar'``} and other
428-
key-value pairs are forwarded to ``zipfile.ZipFile``, ``gzip.GzipFile``,
429-
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or ``tarfile.TarFile``, respectively. As an
430-
example, the following could be passed for Zstandard decompression using a
434+
key-value pairs are forwarded to
435+
``zipfile.ZipFile``, ``gzip.GzipFile``,
436+
``bz2.BZ2File``, ``zstandard.ZstdDecompressor`` or
437+
``tarfile.TarFile``, respectively.
438+
As an example, the following could be passed for Zstandard decompression using a
431439
custom compression dictionary:
432440
``compression={'method': 'zstd', 'dict_data': my_compression_dict}``."""
433441

pandas/io/common.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
import mmap
2020
import os
2121
from pathlib import Path
22-
import tarfile
2322
import re
23+
import tarfile
2424
from typing import (
2525
IO,
2626
Any,

0 commit comments

Comments
 (0)