ArrayReader¶
arro3.core.ArrayReader ¶
A stream of Arrow Arrays.
This is similar to the RecordBatchReader but each
item yielded from the stream is an Array, not a
RecordBatch.
__arrow_c_stream__ ¶
An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.
For example, you can call pyarrow.chunked_array() to
convert this ArrayReader to a pyarrow ChunkedArray, without copying memory.
from_arrow
classmethod
¶
from_arrow(input: ArrowArrayExportable | ArrowStreamExportable) -> ArrayReader
Construct this from an existing Arrow object.
It can be called on anything that exports the Arrow stream interface
(has an __arrow_c_stream__ method), such as a Table or ArrayReader.
from_arrow_pycapsule
classmethod
¶
from_arrow_pycapsule(capsule) -> ArrayReader
Construct this object from a bare Arrow PyCapsule
from_stream
classmethod
¶
from_stream(data: ArrowStreamExportable) -> ArrayReader
Construct this from an existing Arrow object.
This is an alias of and has the same behavior as
from_arrow, but is included for parity
with pyarrow.RecordBatchReader.