Skip to content

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.

closed

closed: bool = <attribute 'closed' of 'arro3.core._core.ArrayReader' objects>

field

field: Field = <attribute 'field' of 'arro3.core._core.ArrayReader' objects>

__arrow_c_stream__ method descriptor

__arrow_c_stream__(requested_schema: object | None = None) -> object

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

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.

read_next_array method descriptor

read_next_array() -> Array

Read the next array from this stream.