jorisvandenbossche commented on issue #35802:
URL: https://github.com/apache/arrow/issues/35802#issuecomment-1582885252
FWIW, I think you can already relatively easily achieve the desired result
with using the `types_mapper` keyword, like
`table.to_pandas(types_mapper=pd.ArrowDtype)`. For example:
```
In [15]: table = pa.table({'a': [1, 2, 3], 'b': ["a", "b", "c"]})
In [16]: df = table.to_pandas(types_mapper=pd.ArrowDtype)
In [17]: df
Out[17]:
a b
0 1 a
1 2 b
2 3 c
In [18]: df.dtypes
Out[18]:
a int64[pyarrow]
b string[pyarrow]
dtype: object
```
--
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]