Skip to content

TO_CSV Compression with dict arguement released in .25.0, but my Pandas .25.3 doesn't reflect source? #29328

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

Closed
ahackit opened this issue Nov 1, 2019 · 7 comments · Fixed by #29390

Comments

@ahackit
Copy link
Contributor

ahackit commented Nov 1, 2019

Docstring for TO_CSV from my repo

    compression : str, default 'infer'
        Compression mode among the following possible values: {'infer',
        'gzip', 'bz2', 'zip', 'xz', None}. If 'infer' and `path_or_buf`
        is path-like, then detect compression from the following
        extensions: '.gz', '.bz2', '.zip' or '.xz'. (otherwise no
        compression).

        .. versionchanged:: 0.24.0

           'infer' option added and set to default.

Docstring for TO_CSV from pandas

    compression : str or dict, default 'infer'
        If str, represents compression mode. If dict, value at 'method' is
        the compression mode. Compression mode may be any of the following
        possible values: {'infer', 'gzip', 'bz2', 'zip', 'xz', None}. If
        compression mode is 'infer' and `path_or_buf` is path-like, then
        detect compression mode from the following extensions: '.gz',
        '.bz2', '.zip' or '.xz'. (otherwise no compression). If dict given
        and mode is 'zip' or inferred as 'zip', other entries passed as
        additional compression options.
        .. versionchanged:: 0.25.0
           May now be a dict with key 'method' as compression mode
           and other entries as additional compression options if
           compression mode is 'zip'.

Problem description

Possibly a misunderstaning of documenentation, but based on how it reads I assumed it was released.

TO_CSV has a new compression functionality to accept dictionary with METHOD type and Archive Name, in source repo doc string for TO_CSV says functionality was added to .25.0, but my docstring for TO_CSV doesn't reflect that as shown above.

I'm using a fresh install of Python + Pandas

Expected Output

Output of pd.show_versions()

INSTALLED VERSIONS

commit : None
python : 3.8.0.final.0
python-bits : 64
OS : Windows
OS-release : 10
machine : AMD64
processor : Intel64 Family 6 Model 142 Stepping 9, GenuineIntel
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : English_United States.1252

pandas : 0.25.3
numpy : 1.17.3
pytz : 2019.3
dateutil : 2.8.0
pip : 19.2.3
setuptools : 41.2.0
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : None
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : None
matplotlib : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : None
pytables : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
xarray : None
xlrd : None
xlwt : None
xlsxwriter : None

@cdw9
Copy link

cdw9 commented Nov 1, 2019

It looks like that 0.25.0 version mentioned in 0d0daa8 might be wrong. Shouldn't this be 0.26.0 @drew-heenan @WillAyd ?

@WillAyd
Copy link
Member

WillAyd commented Nov 1, 2019

Weird. Working on posting updated docs for 0.25.3 at the moment so will check after that. But yes feature is part of 0.25

@jreback
Copy link
Contributor

jreback commented Nov 1, 2019

that hash above is for 1.0

@WillAyd
Copy link
Member

WillAyd commented Nov 1, 2019

Whoops yea sorry. This is a 1.0.0 (confused myself before) from #26023

@WillAyd
Copy link
Member

WillAyd commented Nov 1, 2019

Should read as 1.0.0 on master. @ahackit interested in submitting a PR to fix that doc?

@ahackit
Copy link
Contributor Author

ahackit commented Nov 1, 2019 via email

@ahackit
Copy link
Contributor Author

ahackit commented Nov 4, 2019

@WillAyd Assuming I did everything correctly, PR to fix doc #29390

@jreback jreback added this to the 1.0 milestone Nov 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants