Movatterモバイル変換


[0]ホーム

URL:


Skip to main content
Ctrl+K

pandas.read_orc#

pandas.read_orc(path,columns=None,dtype_backend=<no_default>,filesystem=None,**kwargs)[source]#

Load an ORC object from the file path, returning a DataFrame.

Parameters:
pathstr, path object, or file-like object

String, path object (implementingos.PathLike[str]), or file-likeobject implementing a binaryread() function. The string could be a URL.Valid URL schemes include http, ftp, s3, and file. For file URLs, a host isexpected. A local file could be:file://localhost/path/to/table.orc.

columnslist, 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 ofpyarrow.orc.ORCFile.read().

dtype_backend{‘numpy_nullable’, ‘pyarrow’}, default ‘numpy_nullable’

Back-end data type applied to the resultantDataFrame(still experimental). Behaviour is as follows:

  • "numpy_nullable": returns nullable-dtype-backedDataFrame(default).

  • "pyarrow": returns pyarrow-backed nullableArrowDtypeDataFrame.

Added in version 2.0.

filesystemfsspec or pyarrow filesystem, default None

Filesystem object to use when reading the parquet file.

Added in version 2.1.0.

**kwargs

Any additional kwargs are passed to pyarrow.

Returns:
DataFrame

Notes

Before using this function you should read theuser guide about ORCandinstall optional dependencies.

Ifpath 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 apyarrow or fsspec filesystem object into the filesystem keyword to override thisbehavior.

Examples

>>>result=pd.read_orc("example_pa.orc")

[8]ページ先頭

©2009-2025 Movatter.jp