You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am playing around with the geoarrow.pandas integration and found something odd; if I load a data frame containing a geometry column it will successfully load and display the geometry correctly but I am unable able to do anything with it. Anything I try (e.g. df.geometry.geoarrow.*) produces the following error:
TypeError: Can't create geoarrow.array from Arrow array of type None
importgeoarrow.pyarrowasgaimportgeoarrow.pandasas_importpandasaspddf=pd.read_feather("points.feather")
# Example operations that produce the above errordf.astype({ 'geometry': 'geoarrow.wkt' })
x, y=df.geometry.geoarrow.point_coords()
# etc.
The text was updated successfully, but these errors were encountered:
EternalDeiwos
changed the title
Pandas integration does not symetrically store and load with feather format
Pandas integration does not symmetrically store and load with feather format
Mar 7, 2024
Good catch! I haven't opened up the pandas integration project for a while and it may be that some of my assumptions when I wrote the initial version are no longer valid! Other than general time constraints, one of the reasons I haven't put much effort into this part of the repo is that GeoPandas is considering allowing a GeoArrow storage type along these lines, and if that's the case, I'd want geoarrow-pyarrow to just return GeoPandas objects.
Thanks. As I said I am just playing with it so no pressure from my side if this is going to change substantially in the future.
From my first impression, it is a lot easier to understand at a glance what geoarrow.pandas is doing under the hood than the equivalent GeoPandas. I hope wherever this lands, that it will be just as easy to directly access the underlying buffers.
I am playing around with the
geoarrow.pandas
integration and found something odd; if I load a data frame containing a geometry column it will successfully load and display the geometry correctly but I am unable able to do anything with it. Anything I try (e.g.df.geometry.geoarrow.*
) produces the following error:I created the file like this:
and I load the file like this
The text was updated successfully, but these errors were encountered: