zmc
2023-10-12 ed135d79df12a2466b52dae1a82326941211dcc9
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
U
¬ý°dÆã@sôdZddlmZddlmZmZddlmZddlm    Z    m
Z
m Z m Z m Z ddlmZddlmZddlmZdd    lZdd
lmZmZdd lmZdd lmZeed dddddddœdd„ƒZeed dd    dd    ejfddddddœdd„ƒZd    S)z feather-format compat é)Ú annotations)ÚHashableÚSequence)Úlib)Ú DtypeBackendÚFilePathÚ
ReadBufferÚStorageOptionsÚ WriteBuffer)Úimport_optional_dependency)Údoc)Úcheck_dtype_backendN)Ú    DataFrameÚ
RangeIndex)Ú _shared_docs)Ú
get_handleÚstorage_options)rrzFilePath | WriteBuffer[bytes]r    ÚNone)ÚdfÚpathrÚreturnc    KsÐtdƒddlm}t|tƒs&tdƒ‚ddh}|jjdksTt|jƒ}td|›d    ƒ‚|j     t
  t t |ƒƒ¡¡svtd
ƒ‚|jjd k    rŠtd ƒ‚|jj|kržtd ƒ‚t|d|dd}|j||jf|ŽW5QRXd S)aK
    Write a DataFrame to the binary Feather format.
 
    Parameters
    ----------
    df : DataFrame
    path : str, path object, or file-like object
    {storage_options}
 
        .. versionadded:: 1.2.0
 
    **kwargs :
        Additional keywords passed to `pyarrow.feather.write_feather`.
 
        .. versionadded:: 1.1.0
    Úpyarrowr©Úfeatherz'feather only support IO with DataFramesÚstringÚunicodeÚint64z%feather does not support serializing zG for the index; you can .reset_index() to make the index into column(s)zfeather does not support serializing a non-default index for the index; you can .reset_index() to make the index into column(s)Nz=feather does not serialize index meta-data on a default indexz%feather must have string column namesÚwbF©rZis_text)r rrÚ
isinstancerÚ
ValueErrorÚindexZdtypeÚtypeÚequalsrZ
from_rangeÚrangeÚlenÚnameÚcolumnsZ inferred_typerZ write_featherÚhandle)rrrÚkwargsrZ valid_typesÚtypÚhandles©r,úOd:\z\workplace\vscode\pyvenv\venv\Lib\site-packages\pandas/io/feather_format.pyÚ
to_feathers8 
 
 
ÿÿ ÿ ÿr.TzFilePath | ReadBuffer[bytes]zSequence[Hashable] | NoneÚboolzDtypeBackend | lib.NoDefault)rr'Ú use_threadsrÚ dtype_backendc    
CsÐtdƒddlm}t|ƒt|d|ddš}|tjkrZ|j|j|t    |ƒdW5QR£S|j
|j|t    |ƒd}|dkr dd    l m }|j |ƒjd
W5QR£S|dkrÂ|j tjd
W5QR£SW5QRXd S) a»
    Load a feather-format object from the file path.
 
    Parameters
    ----------
    path : str, path object, or file-like object
        String, path object (implementing ``os.PathLike[str]``), or file-like
        object implementing a binary ``read()`` 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}
 
        .. versionadded:: 1.2.0
 
    dtype_backend : {{"numpy_nullable", "pyarrow"}}, defaults to NumPy backed DataFrames
        Which dtype_backend to use, e.g. whether a DataFrame should have NumPy
        arrays, nullable dtypes are used for all dtypes that have a nullable
        implementation when "numpy_nullable" is set, pyarrow is used for all
        dtypes if "pyarrow" is set.
 
        The dtype_backends are still experimential.
 
        .. versionadded:: 2.0
 
    Returns
    -------
    type of object stored in file
    rrrÚrbFr)r'r0Znumpy_nullable)Ú_arrow_dtype_mapping)Z types_mapperN)r rrr rrÚ
no_defaultÚ read_featherr(r/Z
read_tableZpandas.io._utilr3Z    to_pandasÚgetÚpdZ
ArrowDtype)    rr'r0rr1rr+Zpa_tabler3r,r,r-r5cs4( ÿ
ÿÿ r5)N) Ú__doc__Ú
__future__rÚtypingrrZ pandas._libsrZpandas._typingrrrr    r
Zpandas.compat._optionalr Zpandas.util._decoratorsr Zpandas.util._validatorsr Zpandasr7Zpandas.core.apirrZpandas.core.shared_docsrZpandas.io.commonrr.r4r5r,r,r,r-Ú<module>s(        ýC û