You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "trendelkampschroer (via GitHub)" <gi...@apache.org> on 2024/07/05 12:43:32 UTC
Re: [I] [Python] pa.Table.to_pandas(zero_copy_only=True) never succeeds [arrow]
trendelkampschroer commented on issue #39194:
URL: https://github.com/apache/arrow/issues/39194#issuecomment-2210812426
Same error here
```python
frame_ = pd.DataFrame({"A": [1, 2, 3], "B": [4., 5., 6.]})
frame = pl.from_pandas(frame_)
frame.to_pandas(zero_copy_only=True)
>>>Traceback (most recent call last):
File ".../frame.py", line 105, in <module>
frame.to_pandas(zero_copy_only=True)
File ".../lib/python3.10/site-packages/polars/dataframe/frame.py", line 2223, in to_pandas
return self._to_pandas_without_object_columns(
File ".../lib/python3.10/site-packages/polars/dataframe/frame.py", line 2285, in _to_pandas_without_object_columns
return tbl.to_pandas(date_as_object=date_as_object, **kwargs)
File "pyarrow/array.pxi", line 872, in pyarrow.lib._PandasConvertible.to_pandas
File "pyarrow/table.pxi", line 4904, in pyarrow.lib.Table._to_pandas
File ".../lib/python3.10/site-packages/pyarrow/pandas_compat.py", line 779, in table_to_dataframe
result = pa.lib.table_to_blocks(options, table, categories,
File "pyarrow/table.pxi", line 3771, in pyarrow.lib.table_to_blocks
File "pyarrow/error.pxi", line 91, in pyarrow.lib.check_status
pyarrow.lib.ArrowInvalid: Cannot do zero copy conversion into multi-column DataFrame block
```
--
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: github-unsubscribe@arrow.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org