File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -63,6 +63,18 @@ class property**.
63
63
Added ``_metadata``, ``__hash__``, and changed the default definition
64
64
of ``__eq__``.
65
65
66
+ For interaction with Apache Arrow (pyarrow), a ``__from_arrow__`` method
67
+ can be implemented: this method receives a pyarrow Array or ChunkedArray
68
+ as only argument and is expected to return the appropriate pandas
69
+ ExtensionArray for this dtype and the passed values::
70
+
71
+ class ExtensionDtype:
72
+
73
+ def __from_arrow__(
74
+ self, array: pyarrow.Array/ChunkedArray
75
+ ) -> ExtensionArray:
76
+ ...
77
+
66
78
This class does not inherit from 'abc.ABCMeta' for performance reasons.
67
79
Methods and properties required by the interface raise
68
80
``pandas.errors.AbstractMethodError`` and no ``register`` method is
You can’t perform that action at this time.
0 commit comments