honno opened a new issue, #35713:
URL: https://github.com/apache/arrow/issues/35713

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   One seemingly can't interchange `polars` dataframes which have no 
columns/rows
   
   ```python
   >>> from pyarrow.interchange import from_dataframe
   >>> import polars as pl
   >>> from_dataframe(pl.DataFrame({}))
   ValueError: Must pass schema, or at least one RecordBatch
   >>> from_dataframe(pl.DataFrame({"foo": []}))
   ValueError: Must pass schema, or at least one RecordBatch
   ```
   
   `pandas` on the other hand can interchange them.
   
   ```python
   >>> import pandas as pd
   >>> from_dataframe(pd.DataFrame({})) 
   pyarrow.Table
   
   ----
   >>> from_dataframe(pd.DataFrame({"foo": []}))
   pyarrow.Table
   foo: double
   ----
   foo: [[]]
   ```
   
   Possibly related issues
   
   * https://github.com/pandas-dev/pandas/issues/53155
   * https://github.com/pola-rs/polars/issues/8884
   
   Using nightly build of `pyarrow`
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to