-
-
Notifications
You must be signed in to change notification settings - Fork 18.1k
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
DataFrame.to_pickle() fails for .zip format on MacOS and pandas 0.20.3 #17778
Comments
The problem is located in
With this code, the zip file is opened only for reading, and not for writing. Argument |
Yep, problem does seem to be not passing the correct mode, PR to fix welcome! |
It looks like the code for zip was written only for reading? Why not use gzip to write a single zip file? |
BUG: use mode when opening ZipFile. pandas-dev#17778
Can I try this? I'm looking for a first issue as an entry point. |
Yes, go ahead! |
mode is
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? |
Hi @jreback , Will try to fix this issue if it hasn't been fixed since last conversation. Reverting. Thanks, Ming |
Code Sample, a copy-pastable example if possible
Problem description
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).
Expected Output
A zip file that one can re-read with
pandas.read_pickle()
.Output of
pd.show_versions()
INSTALLED VERSIONS
commit: None
python: 2.7.12.final.0
python-bits: 64
OS: Darwin
OS-release: 15.6.0
machine: x86_64
processor: i386
byteorder: little
LC_ALL: None
LANG: None
LOCALE: None.None
pandas: 0.20.3
pytest: None
pip: 9.0.1
setuptools: 36.2.7
Cython: 0.26
numpy: 1.14.0.dev0+029863e
scipy: 0.18.1
xarray: None
IPython: 5.4.1
sphinx: None
patsy: None
dateutil: 2.6.1
pytz: 2017.2
blosc: None
bottleneck: None
tables: None
numexpr: None
feather: None
matplotlib: 2.0.2
openpyxl: None
xlrd: None
xlwt: None
xlsxwriter: None
lxml: None
bs4: None
html5lib: 0.999999999
sqlalchemy: None
pymysql: None
psycopg2: None
jinja2: 2.9.6
s3fs: None
pandas_gbq: None
pandas_datareader: None
The text was updated successfully, but these errors were encountered: