ArrayReader¶
arro3.core.ArrayReader ¶
A stream of Arrow Array
s.
This is similar to the RecordBatchReader
but each
item yielded from the stream is an Array
, not a
RecordBatch
.
__arrow_c_stream__
method descriptor
¶
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.table()
to convert this
ArrayReader to a pyarrow table, without copying memory.
from_arrow
builtin
¶
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
builtin
¶
from_arrow_pycapsule(capsule) -> ArrayReader
Construct this object from a bare Arrow PyCapsule
from_stream
builtin
¶
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
.
read_all
method descriptor
¶
read_all() -> ChunkedArray
Read all batches from this stream into a ChunkedArray.