pyarrow.flight.MetadataRecordBatchReader#
- class pyarrow.flight.MetadataRecordBatchReader#
Bases:
_MetadataRecordBatchReader
The base class for readers for Flight streams.
See also
- __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 FlightStreamChunk 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
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 FlightStreamChunk along with any metadata.
- Returns:
- data
FlightStreamChunk
The next FlightStreamChunk in the stream.
- app_metadata
Buffer
orNone
Application-specific metadata for the batch as defined by Flight.
- data
- 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:
- 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