Skip to content

DOC: Fixed to_pickle compression argument list 'gzip' > 'gz' #38192

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

ooojpeg
Copy link
Contributor

@ooojpeg ooojpeg commented Nov 30, 2020

Removed reference to gzip and replaced with correct extension of gz.

Screenshot 2020-11-30 at 20 43 59

Removed reference to gzip and replaced with correct extention of gz.
@rhshadrach
Copy link
Member

The compression string here is specifying the compression and is used by the code:

# GZ Compression
if compression == "gzip":

This is making the docstring incorrect.

@ooojpeg
Copy link
Contributor Author

ooojpeg commented Nov 30, 2020

@rhshadrach Outdated issue?

@rhshadrach
Copy link
Member

As I commented in the issue, it seems like a good idea to me to have the details that are currently in DataFrame.to_csv also in DataFrame.to_pickle. These details make clear why the argument is "gzip" and not "gz".

…ion from to_csv

Added section of compression parameter from pandas.DataFrame.to_pickle compression parameter.
@ooojpeg
Copy link
Contributor Author

ooojpeg commented Nov 30, 2020

Added information as mentioned by @rhshadrach.
Screenshot 2020-11-30 at 23 11 09

@twoertwein
Copy link
Member

it might be useful to share documentation across all function that support the same compression (csv/pickle/json/...), similar to #37953. I didn't check whether the docstrings match exactly.

@jreback jreback added the Docs label Dec 2, 2020
@jreback jreback added this to the 1.2 milestone Dec 2, 2020
@jreback jreback merged commit b36048d into pandas-dev:master Dec 2, 2020
@jreback
Copy link
Contributor

jreback commented Dec 2, 2020

thanks @ooojpeg

@twoertwein yeah can you open issue(s) to share these doc-strings as you did before.

@ooojpeg ooojpeg deleted the compression_arguments_mistake_#35364 branch December 7, 2020 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: to_pickle arguments for compression have a mistake (easy-fix)
4 participants