pyarrow.RecordBatchStreamReader

class pyarrow.RecordBatchStreamReader(source)[source]

Bases: pyarrow.lib._RecordBatchReader, pyarrow.ipc._ReadPandasOption

Reader for the Arrow streaming binary format

Parameters:source (str, pyarrow.NativeFile, or file-like Python object) – Either a file path, or a readable file object
__init__(source)[source]

Methods

__init__(source)
get_next_batch(self)
read_all(self) Read all record batches as a pyarrow.Table
read_next_batch(self) Read next RecordBatch from the stream.
read_pandas(**options) Read contents of stream and convert to pandas.DataFrame using
get_next_batch(self)
read_all(self)

Read all record batches as a pyarrow.Table

read_next_batch(self)

Read next RecordBatch from the stream. Raises StopIteration at end of stream

read_pandas(**options)

Read contents of stream and convert to pandas.DataFrame using Table.to_pandas

Parameters:**options (arguments to forward to Table.to_pandas) –
Returns:df (pandas.DataFrame)
schema