xorbits.pandas.read_feather#
- xorbits.pandas.read_feather(path: FilePath | ReadBuffer[bytes], columns: Sequence[Hashable] | None = None, use_threads: bool = True, storage_options: StorageOptions | None = None, dtype_backend: DtypeBackend | lib.NoDefault = _NoDefault.no_default) DataFrame [源代码]#
Load a feather-format object from the file path.
- 参数
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.feather
.columns (sequence, default None) – If not provided, all columns are read.
use_threads (bool, default True) – Whether to parallelize reading using multiple threads.
storage_options (dict, optional) –
Extra options that make sense for a particular storage connection, e.g. host, port, username, password, etc. For HTTP(S) URLs the key-value pairs are forwarded to
urllib.request.Request
as header options. For other URLs (e.g. starting with “s3://”, and “gcs://”) the key-value pairs are forwarded tofsspec.open
. Please seefsspec
andurllib
for more details, and for more examples on storage options refer here.1.2.0(pandas) 新版功能.
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) 新版功能.
- 返回类型
type of object stored in file
实际案例
>>> df = pd.read_feather("path/to/file.feather")
警告
This method has not been implemented yet. Xorbits will try to execute it with pandas.
This docstring was copied from pandas.