Closed kylebarron closed 1 month ago
Pandas added support for the Arrow PyCapsule Interface (the __arrow_c_stream__ method) in pandas v2.2. https://github.com/pandas-dev/pandas/pull/56587
__arrow_c_stream__
This method returns a C PyCapsule, so it's not the types of arguments or return value that matters, it's really just the existence of the method, so that when other libraries expect an object defined as
class ArrowStreamExportable(Protocol): def __arrow_c_stream__( self, requested_schema: object | None = None ) -> object: ...
then a DataFrame will satisfy the type checker
DataFrame
assert_type()
Pandas added support for the Arrow PyCapsule Interface (the
__arrow_c_stream__
method) in pandas v2.2. https://github.com/pandas-dev/pandas/pull/56587This method returns a C PyCapsule, so it's not the types of arguments or return value that matters, it's really just the existence of the method, so that when other libraries expect an object defined as
then a
DataFrame
will satisfy the type checkerassert_type()
to assert the type of any return value