Skip to content
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

ENH: xz compression in to_csv() resolves #11852 #12668

Closed
wants to merge 1 commit into from
Closed

ENH: xz compression in to_csv() resolves #11852 #12668

wants to merge 1 commit into from

Conversation

terfilip
Copy link
Contributor

@@ -43,6 +43,7 @@ Other Enhancements
^^^^^^^^^^^^^^^^^^

- ``pd.read_msgpack()`` now always gives writeable ndarrays even when compression is used (:issue:`12359`).
- It is possible to use xz compression when writing a DataFrame to CSV (:issue:`11852`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

and reading

@jreback
Copy link
Contributor

jreback commented Mar 18, 2016

can do this on top of #12175 as that added compression inference and reorged the testing

@jreback jreback added Enhancement Compat pandas objects compatability with Numpy or Python functions labels Mar 18, 2016
@jreback jreback added this to the 0.18.1 milestone Mar 18, 2016
@jreback jreback added the IO CSV read_csv, to_csv label Mar 18, 2016
try:
import lzma
except ImportError:
from backports import lzma
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

only do this if its PY2 (otherwise the ImportError should just raise)

@terfilip
Copy link
Contributor Author

Updated docs to include reading, using PY3 / PY2 instead of except, will rebase when #12175 gets merged.

@jreback
Copy link
Contributor

jreback commented Mar 22, 2016

ok #12175 was merged, pls rebase

@jreback
Copy link
Contributor

jreback commented Mar 22, 2016

also note #12688

@jreback
Copy link
Contributor

jreback commented Mar 22, 2016

interesting this only appears in 2 locations (and not the 3rd). any idea?

@terfilip
Copy link
Contributor Author

@jreback Rebased, will look into #12688

@@ -58,6 +58,7 @@ Other Enhancements

- ``pd.read_csv()`` now supports opening ZIP files that contains a single CSV, via extension inference or explict ``compression='zip'`` (:issue:`12175`)
- ``pd.read_msgpack()`` now always gives writeable ndarrays even when compression is used (:issue:`12359`).
- It is possible to use xz compression when writing to and/or reading from a DataFrame in CSV (:issue:`11852`)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

put the right below line 59, and word similarly.

@terfilip
Copy link
Contributor Author

@jreback For now I will also add it to parsers.py

@terfilip
Copy link
Contributor Author

@jreback Updated

the ZIP file must contain only one data file to be read in.
Set to ``None`` for no decompression.

.. versionadded:: 0.18.0 support for 'zip' compression.
.. versionadded:: 0.18.0 support for 'zip' and 'xz' compression.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this was a typo actually, make this 0.18.1

@jreback
Copy link
Contributor

jreback commented Mar 23, 2016

minor doc fix

@terfilip
Copy link
Contributor Author

@jreback fixed typo

@jreback
Copy link
Contributor

jreback commented Mar 23, 2016

ok, lgtm. ping when green.

@terfilip
Copy link
Contributor Author

@jreback green

jreback pushed a commit to jreback/pandas that referenced this pull request Mar 23, 2016
@jreback jreback closed this in 247fe07 Mar 23, 2016
@jreback
Copy link
Contributor

jreback commented Mar 23, 2016

@terfn thanks!

I refactored to remove some duplicate code, but looks really good!.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Compat pandas objects compatability with Numpy or Python functions Enhancement IO CSV read_csv, to_csv
Projects
None yet
Development

Successfully merging this pull request may close these issues.

xz compression in to_csv()
2 participants