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
Related to ARROW-2428, which describes the issue to convert back to an ExtensionArray in to_pandas.
To start supporting to convert custom ExtensionArrays (eg the nullable Int64Dtype in pandas, or the arrow-backed fletcher arrays, ...) to arrow Arrays (eg in pyarrow.array(..)), I think it would be good to define an interface or hook that external projects can implement and that pyarrow will call if available.
This would allow external projects to define how they can be converted to arrow arrays, without the need that pyarrow itself starts to gather a lot of special cased code for certain types (like pandas' nullable Int64).
This could similar to how numpy looks for the \_\_array\_\_ method, so we might call it \_\_arrow_array\_\_.
Related to ARROW-2428, which describes the issue to convert back to an ExtensionArray in
to_pandas
.To start supporting to convert custom ExtensionArrays (eg the nullable Int64Dtype in pandas, or the arrow-backed fletcher arrays, ...) to arrow Arrays (eg in
pyarrow.array(..)
), I think it would be good to define an interface or hook that external projects can implement and that pyarrow will call if available.This would allow external projects to define how they can be converted to arrow arrays, without the need that pyarrow itself starts to gather a lot of special cased code for certain types (like pandas' nullable Int64).
This could similar to how numpy looks for the
\_\_array\_\_
method, so we might call it\_\_arrow_array\_\_
.See also pandas-dev/pandas#20612 for an issue discussing this on the pandas side.
Reporter: Joris Van den Bossche / @jorisvandenbossche
Related issues:
Note: This issue was originally created as ARROW-5271. Please see the migration documentation for further details.
The text was updated successfully, but these errors were encountered: