-
Notifications
You must be signed in to change notification settings - Fork 4.1k
[Python] Support protocols to extract Arrow objects from third-party classes #20293
Copy link
Copy link
Closed
Description
In the style of NumPy's __array__, we should be able to ask inputs to pa.array, pa.Table.from_X, ... whether they can convert themselves to Arrow objects. This would allow for example to turn objects that hold an Arrow object internally to expose them directly instead of going a conversion path.
My current use case involves Pandas ExtensionArray instances that internally have Arrow objects and should be reused when we pass the whole DataFrame to pa.Table.from_pandas.
Reporter: Uwe Korn / @xhochy
Assignee: Joris Van den Bossche / @jorisvandenbossche
Related issues:
- [Python] support pandas' nullable Integer type in from_pandas (blocks)
- [Python] Interface for converting pandas ExtensionArray / other custom array objects to pyarrow Array (duplicates)
PRs and other links:
Note: This issue was originally created as ARROW-3829. Please see the migration documentation for further details.
Reactions are currently unavailable