DOC: to_pickle
arguments for compression
have a mistake (easy-fix)
#35364
Labels
to_pickle
arguments for compression
have a mistake (easy-fix)
#35364
Location of the documentation
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_pickle.html
Documentation problem
compression{‘infer’, ‘gzip’, ‘bz2’, ‘zip’, ‘xz’, None}, default ‘infer’
notes thatgzip
is a valid extension, this is wrong, the extension checked for isgz
. The documentation forto_csv
is correct with... detect compression mode from the following extensions: ‘.gz’, ‘.bz2’, ‘.zip’ or ‘.xz’
and should act as a guide: https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.DataFrame.to_csv.htmlSuggested fix for documentation
compression{‘infer’, ‘gz’, ‘bz2’, ‘zip’, ‘xz’, None}, default ‘infer’
to match the code implementation: https://github.com/pandas-dev/pandas/blob/v1.0.5/pandas/io/common.py#L223There may be an argument to extending the
_compression_to_extension
code to accept bothgzip
andgz
for gzip compression, whoever reads this might decide this is worth escalating. For me making sure we fix the docs in line with the code is the priority.The text was updated successfully, but these errors were encountered: