pyarrow.flight.MetadataRecordBatchReader#
- class pyarrow.flight.MetadataRecordBatchReader#
基类:
_MetadataRecordBatchReaderFlight 流读取器的基类。
另请参阅
- __init__(*args, **kwargs)#
方法
__init__(*args, **kwargs)read_all(self)将流的全部内容作为 Table 读取。
read_chunk(self)读取下一个 FlightStreamChunk 及任何元数据。
read_pandas(self, **options)将流内容读取为 pandas.DataFrame。
to_reader(self)将此读取器转换为常规的 RecordBatchReader。
属性
- read_all(self)#
将流的全部内容作为 Table 读取。
- read_chunk(self)#
读取下一个 FlightStreamChunk 及任何元数据。
- 返回:
- chunk
FlightStreamChunk 流中的下一个 FlightStreamChunk。
- chunk
- 引发:
StopIteration当流结束时
- read_pandas(self, **options)#
将流内容读取为 pandas.DataFrame。
将所有记录批次读取为 pyarrow.Table,然后使用 Table.to_pandas 将其转换为 pandas.DataFrame。
- 参数:
- **options
转发到
Table.to_pandas()的参数。
- 返回:
- schema#
获取此读取器的 schema。
- stats#
当前 Flight 读取统计信息。
- 返回:
ReadStats
- to_reader(self)#
将此读取器转换为常规的 RecordBatchReader。
如果无法从远端读取 schema,这可能会失败。
- 返回:
- RecordBatchReader