pyarrow.feather.read_feather#

pyarrow.feather.read_feather(source, columns=None, use_threads=True, memory_map=False, **kwargs)[source]#

从 Feather 格式读取 pandas.DataFrame。要读取为 pyarrow.Table,请使用 feather.read_table。

参数:
sourcestr 文件路径,或类似文件对象

您可以将 MemoryMappedFile 用作 source,以显式使用内存映射。

columns序列, optional

仅读取特定的列集。如果未提供,则读取所有列。

use_threadsbool, 默认 True

是否使用多线程并行读取。如果为 false,则在转换为 Pandas 和从 Feather 格式读取时都使用限制。

memory_mapbool, 默认值 False

当 source 是 str 时,在打开磁盘文件时使用内存映射。

**kwargs

传递给 pyarrow.Table.to_pandas 的额外关键字参数。

返回:
dfpandas.DataFrame

Feather 文件的内容以 pandas.DataFrame 形式表示