Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
DataFrame.to_pickle() fails for .zip format on MacOS and pandas 0.20.3 #17778
Code Sample, a copy-pastable example if possible
import pandas as pd import numpy as np df = pd.DataFrame(np.random.randn(3, 4), index=['A', 'B', 'C']) df.to_pickle('out.zip') #pd.read_pickle('out.zip')
The below exception occurs. I do have writing permissions in the working directory. The code was working for pandas 0.19.0.
No problems observed for bz2 and gzip compression (xz I haven't tested).
A zip file that one can re-read with
The problem is located in
With this code, the zip file is opened only for reading, and not for writing. Argument
added a commit
Oct 5, 2017
So I just took out the
Any pointers on how to move ahead? As @MasonGallo said, the code looks like it was meant only for reading.
When I looked at it, I didn't find a straightforward way of doing it. The problem is that
Maybe one can construct something around
Alternatively follow up on @MasonGallo comment regarding gzip?