pyarrow.feather.write_feather#
- pyarrow.feather.write_feather(df, dest, compression=None, compression_level=None, chunksize=None, version=2)[源]#
将 pandas.DataFrame 写入 Feather 格式。
- 参数:
- df
pandas.DataFrame或pyarrow.Table 要以 Feather 格式写入的数据。
- dest
str 本地目标路径。
- compression
str, 默认值None 可以是 {“zstd”, “lz4”, “uncompressed”} 中的一个。默认值 None 在可用时对 V2 文件使用 LZ4,否则不压缩。
- compression_level
int, 默认值None 使用所选压缩器特有的压缩级别。如果为 None,则使用默认压缩级别。
- chunksize
int, 默认值None 对于 V2 文件,写入 Arrow IPC 文件格式时 Arrow RecordBatch 块的内部最大大小。None 表示使用默认值,目前为 64K。
- version
int, 默认值 2 Feather 文件版本。版本 2 是当前版本。版本 1 是限制更多的旧格式。
- df