-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Compression keyword for Stata and others? #26599
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
Comments
Related issue #21640 |
Compression on io function is for native compression. csv can be gziped so this looks like a native (and common) compression. Stata dta files do not support compression. All you need to do is to use |
Since all kinds of files can be zipped and are distributed like that, it seems strange to implement it in one kind and not others. In any case, you are right that any zip file can be unzipped and loaded into a |
This distinction also seems strange to me; Stata files are commonly zipped (e.g. the Federal Reserve's Survey of Consumer Finances, where zipping reduces filesize by 90%), and since it's possible, it seems more convenient to offer the same interface provided to I asked how to do this and got a couple answers using Adding the functionality to |
I agree, it's not nice that Pandas should support this. @WillAyd would you consider re-opening this? |
Add standard compression optons to stata exporters closes pandas-dev#26599
Add standard compression optons to stata exporters closes pandas-dev#26599
Was this added to 1.1? It's not working for me:
|
Friendly ping, I got the same error messages as above in pandas 1.2.0. |
@MaxGhenis it has not been added to |
@bashtage would adding that be a separate issue? Or is there another way to read a zipped stata file now? |
pls create a new issue |
Add support for reading compressed dta files directly xref pandas-dev#26599
Add support for reading compressed dta files directly xref pandas-dev#26599
Hi,
I was trying to open zipped Stata files and thought one could do it as in
read_csv
using thecompression='zip'
keyword option. Is this not implemented? Saw #15644 and follow ups, but at the time it seems the discussion was about output not input files. In many cases providers give Stata files in zip format, which e.g. in my case may mean 1000's of different zipped archives containing Stata + other files. #12103 seems to have added the functionality more generally, but at least inpd.__version__=0.23.4
it still complains when passing thecompression
keyword. I do not see the option inpandas/io/stata.py
although incommon.py
the option seems to be there. Any pointers? I am happy to contribute if I can figure out where and how this is implemented for other formats.The text was updated successfully, but these errors were encountered: