We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
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
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
import pandas as pd pd.options.future.infer_string = True df = pd.DataFrame({"a": list("123")}) import pickle pickle.dumps(df.index) Out[6]: b'\x80\x04\x95\x82\x00\x00\x00\x00\x00\x00\x00\x8c\x18pandas.core.indexes.base\x94\x8c\n_new_Index\x94\x93\x94\x8c\x19pandas.core.indexes.range\x94\x8c\nRangeIndex\x94\x93\x94}\x94(\x8c\x04name\x94N\x8c\x05start\x94K\x00\x8c\x04stop\x94K\x03\x8c\x04step\x94K\x01u\x86\x94R\x94.' df.index Out[7]: RangeIndex(start=0, stop=3, step=1) df.dtypes.index Out[8]: Index(['a'], dtype='string') pickle.dumps(df.dtypes.index) Traceback (most recent call last): File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/IPython/core/interactiveshell.py", line 3508, in run_code exec(code_obj, self.user_global_ns, self.user_ns) File "<ipython-input-9-e0544207018a>", line 1, in <module> pickle.dumps(df.dtypes.index) File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pandas/core/arrays/arrow/array.py", line 615, in __getstate__ state = self.__dict__.copy() ^^^^^^^^^^^^^ File "/Users/codingl2k1/.pyenv/versions/3.11.4/lib/python3.11/site-packages/pandas/core/arrays/string_arrow.py", line 461, in __getattribute__ return partial(getattr(ArrowStringArrayMixin, item), self) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: the first argument must be callable
Can't pickle ArrowStringArrayNumpySemantics.
ArrowStringArrayNumpySemantics
pickle / unpickle ArrowStringArrayNumpySemantics is OK.
commit : ba1cccd python : 3.11.4.final.0 python-bits : 64 OS : Darwin OS-release : 22.6.0 Version : Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020 machine : arm64 processor : arm byteorder : little LC_ALL : None LANG : None LOCALE : None.UTF-8 pandas : 2.1.0 numpy : 1.24.4 pytz : 2023.3 dateutil : 2.8.2 setuptools : 65.5.0 pip : 23.2.1 Cython : 3.0.2 pytest : 7.4.0 hypothesis : None sphinx : 4.5.0 blosc : None feather : None xlsxwriter : 3.1.2 lxml.etree : 4.9.3 html5lib : None pymysql : None psycopg2 : None jinja2 : 3.1.2 IPython : 8.14.0 pandas_datareader : None bs4 : 4.12.2 bottleneck : None dataframe-api-compat: None fastparquet : None fsspec : 2023.6.0 gcsfs : None matplotlib : 3.7.2 numba : 0.57.1 numexpr : None odfpy : None openpyxl : 3.1.2 pandas_gbq : None pyarrow : 13.0.0 pyreadstat : None pyxlsb : None s3fs : 2023.6.0 scipy : 1.11.1 sqlalchemy : 1.4.49 tables : None tabulate : 0.9.0 xarray : None xlrd : 2.0.1 zstandard : 0.21.0 tzdata : 2023.3 qtpy : None pyqt5 : None
The text was updated successfully, but these errors were encountered:
Thx for reporting this!
I found this yesterday as well and it's already fixed (will be available in 2.1.1 in 10 days or so)
#55051
Sorry, something went wrong.
No branches or pull requests
Pandas version checks
I have checked that this issue has not already been reported.
I have confirmed this bug exists on the latest version of pandas.
I have confirmed this bug exists on the main branch of pandas.
Reproducible Example
Issue Description
Can't pickle
ArrowStringArrayNumpySemantics
.Expected Behavior
pickle / unpickle
ArrowStringArrayNumpySemantics
is OK.Installed Versions
INSTALLED VERSIONS
commit : ba1cccd
python : 3.11.4.final.0
python-bits : 64
OS : Darwin
OS-release : 22.6.0
Version : Darwin Kernel Version 22.6.0: Wed Jul 5 22:21:53 PDT 2023; root:xnu-8796.141.3~6/RELEASE_ARM64_T6020
machine : arm64
processor : arm
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 2.1.0
numpy : 1.24.4
pytz : 2023.3
dateutil : 2.8.2
setuptools : 65.5.0
pip : 23.2.1
Cython : 3.0.2
pytest : 7.4.0
hypothesis : None
sphinx : 4.5.0
blosc : None
feather : None
xlsxwriter : 3.1.2
lxml.etree : 4.9.3
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.1.2
IPython : 8.14.0
pandas_datareader : None
bs4 : 4.12.2
bottleneck : None
dataframe-api-compat: None
fastparquet : None
fsspec : 2023.6.0
gcsfs : None
matplotlib : 3.7.2
numba : 0.57.1
numexpr : None
odfpy : None
openpyxl : 3.1.2
pandas_gbq : None
pyarrow : 13.0.0
pyreadstat : None
pyxlsb : None
s3fs : 2023.6.0
scipy : 1.11.1
sqlalchemy : 1.4.49
tables : None
tabulate : 0.9.0
xarray : None
xlrd : 2.0.1
zstandard : 0.21.0
tzdata : 2023.3
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: