RecordBatchReader¶
arro3.core.RecordBatchReader ¶
An Arrow RecordBatchReader.
A RecordBatchReader holds a stream of 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.RecordBatchReader.from_stream
to convert this stream to a pyarrow RecordBatchReader. Alternatively, you can
call pyarrow.table() to consume this stream to a pyarrow
table or Table.from_arrow() to consume this stream to an
arro3 Table.
from_arrow
classmethod
¶
from_arrow(
input: ArrowArrayExportable | ArrowStreamExportable,
) -> RecordBatchReader
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 RecordBatchReader.
from_arrow_pycapsule
classmethod
¶
from_arrow_pycapsule(capsule) -> RecordBatchReader
Construct this object from a bare Arrow PyCapsule