Skip to content

Commit f5c14bd

Browse files
author
wdyy20041223
committed
DOC: Inline docstrings in pandas\core\generic.py file for methods: droplevel, to_excel, to_json
1 parent e892a63 commit f5c14bd

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

pandas/core/generic.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2400,19 +2400,19 @@ def to_json(
24002400
throw ValueError if incorrect 'orient' since others are not
24012401
list-like.
24022402
compression : str or dict, default 'infer'
2403-
For on-the-fly compression of the output data. If 'infer' and 'path_or_buf' is
2404-
path-like, then detect compression from the following extensions: '.gz',
2405-
'.bz2', '.zip', '.xz', '.zst', '.tar', '.tar.gz', '.tar.xz' or '.tar.bz2'
2406-
(otherwise no compression).
2403+
For on-the-fly compression of the output data. If 'infer' and
2404+
'path_or_buf' is path-like, then detect compression from the
2405+
following extensions: '.gz', '.bz2', '.zip', '.xz', '.zst', '.tar',
2406+
'.tar.gz', '.tar.xz' or '.tar.bz2' (otherwise no compression).
24072407
Set to ``None`` for no compression.
24082408
Can also be a dict with key ``'method'`` set
2409-
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``, ``'tar'``} and
2410-
other key-value pairs are forwarded to
2409+
to one of {``'zip'``, ``'gzip'``, ``'bz2'``, ``'zstd'``, ``'xz'``,
2410+
``'tar'``} and other key-value pairs are forwarded to
24112411
``zipfile.ZipFile``, ``gzip.GzipFile``,
24122412
``bz2.BZ2File``, ``zstandard.ZstdCompressor``, ``lzma.LZMAFile`` or
24132413
``tarfile.TarFile``, respectively.
2414-
As an example, the following could be passed for faster compression and to create
2415-
a reproducible gzip archive:
2414+
As an example, the following could be passed for faster compression
2415+
and to create a reproducible gzip archive:
24162416
``compression={'method': 'gzip', 'compresslevel': 1, 'mtime': 1}``.
24172417
24182418
.. versionadded:: 1.5.0

0 commit comments

Comments
 (0)