pyarrow.dataset.OrcFileFormat#

class pyarrow.dataset.OrcFileFormat#

Bases: FileFormat

__init__(*args, **kwargs)#

方法

__init__(*args, **kwargs)

equals(self, OrcFileFormat other)

inspect(self, file[, filesystem])

推断文件的模式。

make_fragment(self, file[, filesystem, ...])

从给定的文件创建 FileFragment。

make_write_options(self)

属性

default_extname#
default_fragment_scan_options#
equals(self, OrcFileFormat other)#
参数:
otherpyarrow.dataset.OrcFileFormat
返回:
True
inspect(self, file, filesystem=None)#

推断文件的模式。

参数:
file文件对象、类路径对象或 str

要从中推断模式的文件或文件路径。

filesystemFilesystem, 可选

如果给定了 filesystem,则 file 必须是一个字符串,并指定要从文件系统读取的文件路径。

返回:
schemaSchema

从文件推断出的模式。

make_fragment(self, file, filesystem=None, Expression partition_expression=None, *, file_size=None)#

从给定的文件创建 FileFragment。

参数:
file文件对象、类路径对象或 str

要从中创建片段的文件或文件路径。

filesystemFilesystem, 可选

如果给定了 filesystem,则 file 必须是一个字符串,并指定要从文件系统读取的文件路径。

partition_expressionExpression, 可选

一个表达式,保证片段中的所有行都为真。允许在扫描时使用过滤器跳过片段。

file_sizeint, 可选

文件大小(以字节为单位)。当需要在读取前知道文件大小时,可以提高高延迟文件系统的性能。

返回:
fragmentFragment

文件片段。

make_write_options(self)#