xorbits.pandas.read_orc#
- xorbits.pandas.read_orc(path: FilePath | ReadBuffer[bytes], columns: list[str] | None = None, dtype_backend: DtypeBackend | lib.NoDefault = _NoDefault.no_default, filesystem: pyarrow.fs.FileSystem | fsspec.spec.AbstractFileSystem | None = None, **kwargs: Any) DataFrame [源代码]#
Load an ORC object from the file path, returning a DataFrame.
- 参数
path (str, path object, or file-like object) – String, path object (implementing
os.PathLike[str]
), or file-like object implementing a binaryread()
function. The string could be a URL. Valid URL schemes include http, ftp, s3, and file. For file URLs, a host is expected. A local file could be:file://localhost/path/to/table.orc
.columns (list, default None) – If not None, only these columns will be read from the file. Output always follows the ordering of the file and not the columns list. This mirrors the original behaviour of .
dtype_backend ({'numpy_nullable', 'pyarrow'}, default 'numpy_nullable') –
Back-end data type applied to the resultant
DataFrame
(still experimental). Behaviour is as follows:"numpy_nullable"
: returns nullable-dtype-backedDataFrame
(default)."pyarrow"
: returns pyarrow-backed nullableArrowDtype
DataFrame.
2.0(pandas) 新版功能.
filesystem (fsspec or pyarrow filesystem, default None) –
Filesystem object to use when reading the parquet file.
2.1.0(pandas) 新版功能.
**kwargs – Any additional kwargs are passed to pyarrow.
- 返回类型
提示
Before using this function you should read the user guide about ORC and install optional dependencies.
If
path
is a URI scheme pointing to a local or remote file (e.g. “s3://”), apyarrow.fs
filesystem will be attempted to read the file. You can also pass a pyarrow or fsspec filesystem object into the filesystem keyword to override this behavior.实际案例
>>> result = pd.read_orc("example_pa.orc")
警告
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.