BUG: TypeError: _reconstruct: First argument must be a sub-type of ndarray
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.
Code Sample
import pandas as pd
pd.read_pickle("filtered_data.pickle")
Problem description
I am able to import the dataframe (which can be downloaded in zipped form from here) with Pandas version 0.24.2 but get the following error with version 1.0.3:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/homes/jua23/.virtualenvs/arch_uncert/lib/python3.7/site-packages/pandas/io/pickle.py", line 182, in read_pickle
return pickle.load(f)
TypeError: _reconstruct: First argument must be a sub-type of ndarray
Output of pd.show_versions()
INSTALLED VERSIONS
commit : None python : 3.7.7.final.0 python-bits : 64 OS : Linux OS-release : 5.3.0-42-generic machine : x86_64 processor : x86_64 byteorder : little LC_ALL : None LANG : en_GB.UTF-8 LOCALE : en_GB.UTF-8
pandas : 1.0.3 numpy : 1.18.2 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 46.0.0 Cython : 0.29.15 pytest : None hypothesis : None sphinx : None blosc : None feather : None xlsxwriter : None lxml.etree : None html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.1 IPython : 7.13.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : None matplotlib : 3.2.1 numexpr : None odfpy : None openpyxl : None pandas_gbq : None pyarrow : None pytables : None pytest : None pyxlsb : None s3fs : None scipy : 1.4.1 sqlalchemy : None tables : None tabulate : None xarray : None xlrd : None xlwt : None xlsxwriter : None numba : None
Issue Analytics
- State:
- Created 3 years ago
- Comments:10 (4 by maintainers)
Top GitHub Comments
Hey Neil! Yes, here you go: https://www.dropbox.com/s/sxf3z1g7ltr60dy/filtered_data2.pickle?dl=0
Let me know If that doesn’t work.
By the way, what is the source for this file? I acquired it through a long chain of people. It would be good to know where the official source is!
Thanks James!
Nicolò Fusi @nfusi pulled it together for the Hensman, Fusi and Lawrence UAI 2013 GPs for Big Data paper.
It should be available via the pods software (pip install pods), but the software had the bug that’s flagged here (pickle is a real pain for data) … there’s a jupyter notebook for it here:
https://github.com/sods/ods/blob/master/notebooks/pods/datasets/airline-delay.ipynb