pyarrow.flight.FlightStreamReader#
- class pyarrow.flight.FlightStreamReader#
- Bases: - MetadataRecordBatchReader- A reader that can also be canceled. - __init__(*args, **kwargs)#
 - Methods - __init__(*args, **kwargs)- cancel(self)- Cancel the read operation. - 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 - cancel(self)#
- Cancel the read operation. 
 - 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:
- chunkFlightStreamChunk
- The next FlightStreamChunk in the stream. 
 
- chunk
- 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. 
 - stats#
- Current Flight read statistics. - Returns:
- ReadStats
 
 
 - 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
 
 
 
 
    