Description
-
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 master branch of pandas.
Reproducible Example
s = pd.DataFrame({'s':['aaa', 'bbb', 'ccc']})
print(f'Initial df bytes {s.memory_usage(deep=True, index=False).sum()}')
# Initial df bytes 180
s = s.assign(s=s.s.astype('string[pyarrow]'))
print(f'pyarrow string df bytes {s.memory_usage(deep=True, index=False).sum()}')
# pyarrow string df bytes 25
s.to_feather('s.feather')
s = pd.read_feather('s.feather')
print(f'after feather bytes {s.memory_usage(deep=True, index=False).sum()}')
# after feather bytes 180
Issue Description
Loading a df that contains a column of type string[pyarrow] from a feather file loads the column as type string
Expected Behavior
Load the column in its original string[pyarrow] type
Installed Versions
INSTALLED VERSIONS
commit : 5f648bf
python : 3.9.6.final.0
python-bits : 64
OS : Darwin
OS-release : 20.4.0
Version : Darwin Kernel Version 20.4.0: Thu Apr 22 21:46:47 PDT 2021; root:xnu-7195.101.2~1/RELEASE_X86_64
machine : x86_64
processor : i386
byteorder : little
LC_ALL : None
LANG : None
LOCALE : None.UTF-8
pandas : 1.3.2
numpy : 1.21.2
pytz : 2021.1
dateutil : 2.8.2
pip : 21.2.4
setuptools : 52.0.0.post20210125
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : 3.0.1
IPython : 7.27.0
pandas_datareader: None
bs4 : None
bottleneck : None
fsspec : 2021.08.1
fastparquet : None
gcsfs : 2021.08.1
matplotlib : 3.4.3
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 5.0.0
pyxlsb : None
s3fs : None
scipy : 1.7.1
sqlalchemy : 1.4.23
tables : None
tabulate : None
xarray : None
xlrd : None
xlwt : None
numba : None