ValueError
when calling from_arrow
on iterable with empty pyarrow.Table
#22634
Labels
bug
Something isn't working
needs triage
Awaiting prioritization by a maintainer
python
Related to Python Polars
Checks
Reproducible example
Log output
Issue description
It seems that
pl.from_arrow
does not handle input provided as an iterable properly. It appears to fail when given an emptypyarrow.Table
I think the error comes from
polars/py-polars/polars/convert/general.py
Lines 568 to 572 in 5cedf53
If we call
.to_batches()
on emptypyarrow.Table
, it returns an empty list, and we lose the schema/type information because there are no batches at all.Expected behavior
Return empty
DataFrame
with preserved schema.Installed versions
The text was updated successfully, but these errors were encountered: