BUG: fixed_size_list pyarrow type not interpretable on round-trip write/read. #59738
Open
2 of 3 tasks
Labels
Arrow
pyarrow functionality
Bug
IO Parquet
parquet, feather
Needs Discussion
Requires discussion from core team before further action
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
In the example, we convert the PyArrow table to a pandas DataFrame, using the types mapper to enforce the
fixed_size_list
type of columnb
.As of the versions indicated below, this results in the following error:
If you inspect the generated file, you see that the pyarrow schema reflects the
fixed_size_list
. e.gpq.read_metadata("using_types_mapper.parquet").schema.to_arrow_schema()
.If, instead, you do not indicate a types mapper, the type of
fixed_size_list
is lost, and the parquet file on-disk just uses alist
type:Expected Behavior
I would expect to
b
fixed_size_list
type for columnb
Installed Versions
INSTALLED VERSIONS
commit : d9cdd2e
python : 3.11.9.final.0
python-bits : 64
OS : Linux
OS-release : 6.5.0-1025-oem
Version : #26-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 12:35:22 UTC 2024
machine : x86_64
processor : x86_64
byteorder : little
LC_ALL : None
LANG : en_US.UTF-8
LOCALE : en_US.UTF-8
pandas : 2.2.2
numpy : 2.1.1
pytz : 2024.1
dateutil : 2.9.0
setuptools : 72.1.0
pip : 24.2
Cython : None
pytest : None
hypothesis : None
sphinx : None
blosc : None
feather : None
xlsxwriter : None
lxml.etree : None
html5lib : None
pymysql : None
psycopg2 : None
jinja2 : None
IPython : 8.27.0
pandas_datareader : None
adbc-driver-postgresql: None
adbc-driver-sqlite : None
bs4 : None
bottleneck : None
dataframe-api-compat : None
fastparquet : None
fsspec : None
gcsfs : None
matplotlib : None
numba : None
numexpr : None
odfpy : None
openpyxl : None
pandas_gbq : None
pyarrow : 17.0.0
pyreadstat : None
python-calamine : None
pyxlsb : None
s3fs : None
scipy : None
sqlalchemy : None
tables : None
tabulate : None
xarray : None
xlrd : None
zstandard : None
tzdata : 2024.1
qtpy : None
pyqt5 : None
The text was updated successfully, but these errors were encountered: