question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

BUG: regression for 1.3.0: saving a dataframe with the "pickle" package using pandas 1.2.5 would not open with "pickle" again with pandas 1.3.0

See original GitHub issue
  • I have checked that this issue has not already been reported.

  • I have confirmed this bug exists on the latest version of pandas.

  • (optional) I have confirmed this bug exists on the master branch of pandas.


Note: Please read this guide detailing how to provide the necessary information for us to reproduce your bug.

Code Sample, a copy-pastable example

I created a notebook here to illustrate the issue

https://colab.research.google.com/drive/1por9_BTeLYvZxNzLOBv_jIsFh44mnz4N?usp=sharing

Main error message:

/usr/local/lib/python3.7/dist-packages/pandas/_libs/internals.pyx in pandas._libs.internals.BlockManager.__cinit__()

TypeError: __cinit__() takes at least 2 positional arguments (0 given)

Problem description

Dataframes saved with pandas 1.2.5 and “pickle” are no longer loadable with pandas 1.3.0

Related to #42343

Expected Output

Output of pd.show_versions()

INSTALLED VERSIONS

commit : f00ed8f47020034e752baf0250483053340971b0 python : 3.7.10.final.0 python-bits : 64 OS : Linux OS-release : 5.4.104+ Version : #1 SMP Sat Jun 5 09:50:34 PDT 2021 machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_US.UTF-8 LOCALE : en_US.UTF-8

pandas : 1.3.0 numpy : 1.19.5 pytz : 2018.9 dateutil : 2.8.1 pip : 19.3.1 setuptools : 57.0.0 Cython : 0.29.23 pytest : 3.6.4 hypothesis : None sphinx : 1.8.5 blosc : None feather : 0.4.1 xlsxwriter : None lxml.etree : 4.2.6 html5lib : 1.0.1 pymysql : None psycopg2 : 2.7.6.1 (dt dec pq3 ext lo64) jinja2 : 2.11.3 IPython : 5.5.0 pandas_datareader: 0.9.0 bs4 : 4.6.3 bottleneck : 1.3.2 fsspec : None fastparquet : None gcsfs : None matplotlib : 3.2.2 numexpr : 2.7.3 odfpy : None openpyxl : 2.5.9 pandas_gbq : 0.13.3 pyarrow : 3.0.0 pyxlsb : None s3fs : None scipy : 1.4.1 sqlalchemy : 1.4.18 tables : 3.4.4 tabulate : 0.8.9 xarray : 0.18.2 xlrd : 1.1.0 xlwt : 1.3.0 numba : 0.51.2

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:14
  • Comments:9 (1 by maintainers)

github_iconTop GitHub Comments

9reactions
XianyuanLiucommented, Jul 6, 2021

I replace pickle.load with pandas.read_pickle and it seems fine. I still don’t know whether they are the same.

1reaction
DAndresSanchezcommented, Jul 5, 2021

I am facing the same issue. I managed to make it work with pandas=1.2.4

Read more comments on GitHub >

github_iconTop Results From Across the Web

What's new in 1.4.0 (January 22, 2022) - Pandas
What's new in 1.4.0 (January 22, 2022)#. These are the changes in pandas 1.4.0. See Release notes for a full changelog including other...
Read more >
Read a pickle with a different version of pandas - Stack Overflow
Load data with the newest version of python and pandas (python 3.8 and pandas 1.4.1 in my case). import pandas as pd import...
Read more >
Release 1.3.3 xgboost developers
pickle.dump(bst, fd). Notice the filename is for Python intrinsic function open, not for XGBoost. Hence parameter.
Read more >
CVS log for pkgsrc/math/py-pandas/PLIST - NetBSD CVS Repositories
Fixed regressions * Fixed regression in DataFrame constructor failing to ... What's new in 1.3.0 (July 2, 2021) These are the changes in...
Read more >
Covasim - IDM docs - Institute for Disease Modeling
We also recommend, but do not require, installing Covasim in a ... not a simple Numpy array; like a pandas dataframe, you can...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found