pyarrow.flight.MetadataRecordBatchReader#

class pyarrow.flight.MetadataRecordBatchReader#

Bases: pyarrow._flight._MetadataRecordBatchReader

The base class for readers for Flight streams.

__init__(*args, **kwargs)#

Methods

__init__(*args, **kwargs)

read_all(self)

Read the entire contents of the stream as a Table.

read_chunk(self)

Read the next RecordBatch along with any metadata.

read_pandas(self, **options)

Read contents of stream to a pandas.DataFrame.

to_reader(self)

Convert this reader into a regular RecordBatchReader.

Attributes

schema

Get the schema for this reader.

read_all(self)#

Read the entire contents of the stream as a Table.

read_chunk(self)#

Read the next RecordBatch along with any metadata.

Returns
dataRecordBatch

The next RecordBatch in the stream.

app_metadataBuffer or None

Application-specific metadata for the batch as defined by Flight.

Raises
StopIteration

when the stream is finished

read_pandas(self, **options)#

Read contents of stream to a pandas.DataFrame.

Read all record batches as a pyarrow.Table then convert it to a pandas.DataFrame using Table.to_pandas.

Parameters
**options

Arguments to forward to Table.to_pandas().

Returns
dfpandas.DataFrame
schema#

Get the schema for this reader.

to_reader(self)#

Convert this reader into a regular RecordBatchReader.

This may fail if the schema cannot be read from the remote end.

Returns
RecordBatchReader