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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
Ë
nñúh‰ãó&—dZddlmZddlZddlmZddlmZmZm    Z    ddl
m Z ddl m Z ddlmZdd    lmZdd
lmZdd lmZmZerddlZddlZdd lmZmZmZmZdd lm Z de jBdf                                            dd„Z"    dddddœ                                            dd„Z#y)z  orc compat é)Ú annotationsN)Ú
ModuleType)Ú TYPE_CHECKINGÚAnyÚLiteral)Úlib)Úimport_optional_dependency)Úcheck_dtype_backend)Ú default_index)Úarrow_table_to_pandas)Ú
get_handleÚ is_fsspec_url)Ú DtypeBackendÚFilePathÚ
ReadBufferÚ WriteBuffer)Ú    DataFramec óŒ—td«}t|«t|dd¬«5}|j}t    |«r7|€5td«}td«}        |    j
j |«\}}|jd
|||dœ|¤Ž}
ddd«t
|¬    «S#t|jf$rYŒBwxYw#1swYŒ1xYw) aÝ
    Load an ORC object from the file path, returning a DataFrame.
 
    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.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
        :external+pyarrow:py:meth:`pyarrow.orc.ORCFile.read`.
    dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
        Back-end data type applied to the resultant :class:`DataFrame`
        (still experimental). Behaviour is as follows:
 
        * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
          (default).
        * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
          DataFrame.
 
        .. versionadded:: 2.0
 
    filesystem : fsspec or pyarrow filesystem, default None
        Filesystem object to use when reading the parquet file.
 
        .. versionadded:: 2.1.0
 
    **kwargs
        Any additional kwargs are passed to pyarrow.
 
    Returns
    -------
    DataFrame
 
    Notes
    -----
    Before using this function you should read the :ref:`user guide about ORC <io.orc>`
    and :ref:`install optional dependencies <install.warn_orc>`.
 
    If ``path`` is a URI scheme pointing to a local or remote file (e.g. "s3://"),
    a ``pyarrow.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.
 
    Examples
    --------
    >>> result = pd.read_orc("example_pa.orc")  # doctest: +SKIP
    ú pyarrow.orcÚrbF©Úis_textNÚpyarrowz
pyarrow.fs)ÚsourceÚcolumnsÚ
filesystem)Ú dtype_backend©) r    r
r ÚhandlerÚ
FileSystemÚfrom_uriÚ    TypeErrorÚ ArrowInvalidÚ
read_tabler ) ÚpathrrrÚkwargsÚorcÚhandlesrÚpaÚpa_fsÚpa_tables            ú@H:\Change_password\venv_build\Lib\site-packages\pandas/io/orc.pyÚread_orcr-&sրô| % ]Ó
3€Cä˜ Ô&ä    D˜$¨Ô    .ð 
°'Ø—‘ˆÜ ˜Ô  :Ð#5Ü+¨IÓ6ˆBÜ.¨|Ó<ˆEð Ø%*×%5Ñ%5×%>Ñ%>¸tÓ%DÑ"
˜Fð"3—>‘>ð
Ø 7°zñ
ØEKñ
ˆ÷ 
ô ! ¸Ô GÐGøô ˜rŸ™Ð/ò Ùð ú÷ 
ð 
ús/¥0B:ÁBÁ4B:ÂB7Â4B:Â6B7Â7B:Â:Cr)ÚengineÚindexÚ engine_kwargscó(—|€|jjddu}|€i}|jjtt    |«««s t d«‚|jj  t d«‚|dk7r t d«‚t|d¬«}td«}td    «}|du}|rtj«}|€J‚t|d
d ¬ «5}t|t«sJ‚    |j|jj||¬ «|j fi|¤Ž    ddd«|r,t|tj«sJ‚|j)«Sy#t"|j$f$r}    t'd«|    ‚d}    ~    wwxYw#1swYŒaxYw)aj
    Write a DataFrame to the ORC format.
 
    .. versionadded:: 1.5.0
 
    Parameters
    ----------
    df : DataFrame
        The dataframe to be written to ORC. Raises NotImplementedError
        if dtype of one or more columns is category, unsigned integers,
        intervals, periods or sparse.
    path : str, file-like object or None, default None
        If a string, it will be used as Root Directory path
        when writing a partitioned dataset. By file-like object,
        we refer to objects with a write() method, such as a file handle
        (e.g. via builtin open function). If path is None,
        a bytes object is returned.
    engine : str, default 'pyarrow'
        ORC library to use.
    index : bool, optional
        If ``True``, include the dataframe's index(es) in the file output. If
        ``False``, they will not be written to the file.
        If ``None``, similar to ``infer`` the dataframe's index(es)
        will be saved. However, instead of being saved as values,
        the RangeIndex will be stored as a range in the metadata so it
        doesn't require much space and is faster. Other indexes will
        be included as columns in the file output.
    engine_kwargs : dict[str, Any] or None, default None
        Additional keyword arguments passed to :func:`pyarrow.orc.write_table`.
 
    Returns
    -------
    bytes if no path argument is provided else None
 
    Raises
    ------
    NotImplementedError
        Dtype of one or more columns is category, unsigned integers, interval,
        period or sparse.
    ValueError
        engine is not pyarrow.
 
    Notes
    -----
    * Before using this function you should read the
      :ref:`user guide about ORC <io.orc>` and
      :ref:`install optional dependencies <install.warn_orc>`.
    * This function requires `pyarrow <https://arrow.apache.org/docs/python/>`_
      library.
    * For supported dtypes please refer to `supported ORC features in Arrow
      <https://arrow.apache.org/docs/cpp/orc.html#data-types>`__.
    * Currently timezones in datetime columns are not preserved when a
      dataframe is converted into ORC files.
    Nrz{orc does not support serializing a non-default index for the index; you can .reset_index() to make the index into column(s)z9orc does not serialize index meta-data on a default indexrzengine must be 'pyarrow'z10.0.1)Ú min_versionrÚwbFr)Úpreserve_indexz6The dtype of one or more columns is not supported yet.)r/ÚnamesÚequalsr ÚlenÚ
ValueErrorÚnamer    ÚioÚBytesIOr Ú
isinstancerÚ write_tableÚTableÚ from_pandasrr"ÚArrowNotImplementedErrorÚNotImplementedErrorÚgetvalue)
Údfr%r.r/r0r)r'Úwas_noner(Úes
          r,Úto_orcrFxs“€ð| €}Ø—‘—‘˜qÑ!¨Ð-ˆØÐ؈ ð 8‰8?‰?œ=¬¨R«Ó1Ô 2Üð Fó
ð    
ð
 
‡xx‡}}РÜÐTÓUÐUà ÒÜÐ3Ó4Ð4Ü '¨¸HÔ E€FÜ    # IÓ    .€BÜ
$ ]Ó
3€Càtˆ|€HÙ܏z‰z‹|ˆØ Ð ÐÐ Ü    D˜$¨Ô    .ð °'ܘ&¤*Ô-Ð-Ð-ð        Ø ˆCO‰OØ— ‘ ×(Ñ(¨¸EÐ(ÓBØ—‘ñ ð ó ÷ ñܘ$¤§
¡
Ô+Ð+Ð+؏}‰}‹ÐØ øô˜2×6Ñ6Ð7ò    Ü%ØHóàð ûð    ú÷ ð ús*ÃFÃ.9EÅFÅ4 FÆFÆFÆF) r%zFilePath | ReadBuffer[bytes]rzlist[str] | NonerzDtypeBackend | lib.NoDefaultrz=pyarrow.fs.FileSystem | fsspec.spec.AbstractFileSystem | Noner&rÚreturnr)N) rCrr%z$FilePath | WriteBuffer[bytes] | Noner.zLiteral['pyarrow']r/z bool | Noner0zdict[str, Any] | NonerGz bytes | None)$Ú__doc__Ú
__future__rr:ÚtypesrÚtypingrrrÚ pandas._libsrÚpandas.compat._optionalr    Úpandas.util._validatorsr
Úpandas.core.indexes.apir Úpandas.io._utilr Úpandas.io.commonr rÚfsspecÚ
pyarrow.fsrÚpandas._typingrrrrÚpandas.core.framerÚ
no_defaultr-rFrór,ú<module>rXsðÙÝ"ã    Ý÷ñõ Ý>Ý7å1å1÷ñ
ÛÛ÷óõ,ð
!%Ø25·.±.ØPTð    OHØ
&ðOHà ðOHð0ðOHðNð    OHð
ð OHð ó OHðh26ðlð"+ØØ+/ñ lØðlà
.ðlð ð    lð
ð lð )ð lðôlrW