We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
import pandas as pd import pickle df = pd.Series(['abc'] + [pd.NA]*60, dtype='string') serialized = pickle.dumps(df) unserialized = pickle.loads(serialized) print(unserialized)
The unserialized df cannot be printed. Fails with ValueError: StringArray requires a sequence of strings or pandas.NA
Note that things work fine with less than 60 pd.NA
import pandas as pd import pickle df = pd.Series(['abc'] + [pd.NA]*59, dtype='string') serialized = pickle.dumps(df) unserialized = pickle.loads(serialized) print(unserialized)
Print out simple df
pd.show_versions()
commit : None python : 3.6.7.final.0 python-bits : 64 OS : Linux OS-release : 3.10.0-1062.9.1.el7.x86_64 machine : x86_64 processor : byteorder : little LC_ALL : C LANG : en_US.UTF-8A LOCALE : None.None
pandas : 1.0.0 numpy : 1.18.1 pytz : 2019.3 dateutil : 2.8.1 pip : 20.0.2 setuptools : 45.2.0.post20200209 Cython : 0.29.15 pytest : 5.3.5 hypothesis : None sphinx : 2.4.1 blosc : None feather : None xlsxwriter : 1.2.7 lxml.etree : 4.5.0 html5lib : None pymysql : None psycopg2 : None jinja2 : 2.11.1 IPython : 7.12.0 pandas_datareader: None bs4 : None bottleneck : None fastparquet : None gcsfs : None lxml.etree : 4.5.0 matplotlib : 3.1.3 numexpr : 2.7.1 odfpy : None openpyxl : None pandas_gbq : None pyarrow : 0.16.0 pytables : None pytest : 5.3.5 pyxlsb : None s3fs : None scipy : 1.4.1 sqlalchemy : 1.3.13 tables : 3.6.1 tabulate : None xarray : 0.15.0 xlrd : 1.2.0 xlwt : 1.3.0 xlsxwriter : 1.2.7 numba : 0.48.0
The text was updated successfully, but these errors were encountered:
Thanks @bjonen
Seems related to #31847
Sorry, something went wrong.
I think it's a duplicate of #31847
No branches or pull requests
Code Sample, a copy-pastable example if possible
Problem description
The unserialized df cannot be printed. Fails with
ValueError: StringArray requires a sequence of strings or pandas.NA
Note that things work fine with less than 60 pd.NA
Expected Output
Print out simple df
Output of
pd.show_versions()
INSTALLED VERSIONS
commit : None
python : 3.6.7.final.0
python-bits : 64
OS : Linux
OS-release : 3.10.0-1062.9.1.el7.x86_64
machine : x86_64
processor :
byteorder : little
LC_ALL : C
LANG : en_US.UTF-8A
LOCALE : None.None
pandas : 1.0.0
numpy : 1.18.1
pytz : 2019.3
dateutil : 2.8.1
pip : 20.0.2
setuptools : 45.2.0.post20200209
Cython : 0.29.15
pytest : 5.3.5
hypothesis : None
sphinx : 2.4.1
blosc : None
feather : None
xlsxwriter : 1.2.7
lxml.etree : 4.5.0
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 2.11.1
IPython : 7.12.0
pandas_datareader: None
bs4 : None
bottleneck : None
fastparquet : None
gcsfs : None
lxml.etree : 4.5.0
matplotlib : 3.1.3
numexpr : 2.7.1
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 0.16.0
pytables : None
pytest : 5.3.5
pyxlsb : None
s3fs : None
scipy : 1.4.1
sqlalchemy : 1.3.13
tables : 3.6.1
tabulate : None
xarray : 0.15.0
xlrd : 1.2.0
xlwt : 1.3.0
xlsxwriter : 1.2.7
numba : 0.48.0
The text was updated successfully, but these errors were encountered: