-
Notifications
You must be signed in to change notification settings - Fork 140
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
read/write compressed csv file #475
Comments
You can already do: CSV.read(GzipDecompressorStream(open(file)))
CSV.write(GzipCompressorStream(open(file))) |
How about picking a particular file from within a zip file? Can that be done? |
There's nothing in CSV.jl to support processing zip archives. It looks like https://github.com/fhs/ZipFile.jl is fairly well maintained. I've avoided taking direct dependencies in CSV.jl for this kind of stuff because it composes really easily where CSV.jl can accept any IO or byte stream/array, and these other packages can provide specific compression/archive support. |
Ok then. Perhaps an example of how to do this with zipfile.jl would be cool |
A PR to the docs would be very welcome! We have a whole "examples" section, so it'd be a great spot to contribute. |
Once I figure out how to use zipfile.jl, I will. Currently, it is mystifying |
Just for reference, this is how reading / writing of a single CSV file inside a zip file worked for me using ZipFile.jl. Reading:
Writing:
For reading, there is an example in the documentation of CSV.jl, for writing not yet. |
From a user's perspective. It always helps |
Added an example how to write a CSV file directly into a zip archive using ZipFiles.jl See JuliaData#475
Shall we have a feature, that read/write compressed file transparently?
see:
https://pandas.pydata.org/pandas-docs/stable/reference/api/pandas.read_csv.html
The text was updated successfully, but these errors were encountered: