apache / arrow

Apache Arrow is a multi-language toolbox for accelerated data interchange and in-memory processing
https://arrow.apache.org/
Apache License 2.0
14.3k stars 3.47k forks source link

[Python] pyarrow extension type is not converted to pandas properly in 13.0.0 #38014

Closed paleolimbot closed 11 months ago

paleolimbot commented 11 months ago

Describe the bug, including details regarding any error messages, version, and platform.

Initially documented here: https://github.com/geoarrow/geoarrow-c/pull/47

The implementation of the extension type is here:

https://github.com/geoarrow/geoarrow-python/blob/main/geoarrow-pyarrow/src/geoarrow/pyarrow/_type.py#L77-L78

I wonder if it has to do with the fact that there are subclasses of the extension type? (i.e., maybe I need to copy that pandas dtype method to all the subclasses?)

Component(s)

Python

paleolimbot commented 11 months ago

Hmm...I tried adding the method to the subclasses but that didn't seem to do it. The PR where I'm trying to unpin the pyarrow dependency is here: https://github.com/geoarrow/geoarrow-python/pull/25

jorisvandenbossche commented 11 months ago

Thanks for the context, will take a look!

paleolimbot commented 11 months ago

Sorry for the noise...I'd defined another @property id. Until recently, that value hadn't been inspected to check if something was an extension type!