-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Description
It would be nice to be able to visualize any array. Note that this should be before __geo_interface__
in the conversion steps.
You might want to do something like the following to ensure the field metadata isn't lost if extension types aren't installed.
if hasattr(obj, "__arrow_c_array__"):
schema, _ = obj.__arrow_c_array__()
class SchemaHolder:
def __init__(self, capsule) -> None:
self.capsule = capsule
def __arrow_c_schema__(self):
return self.capsule
pyarrow_field = pa.field(SchemaHolder(schema))
pyarrow_array = pa.array(obj)
Metadata
Metadata
Assignees
Labels
No labels