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
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
Ë
nñúh?6ãóؗdZddlmZddlmZmZddlmZmZddl    m
Z
m Z ddl m Z e
sddlZddlmZddlmZerdd    lmZdd
lmZmZGd „d e¬ «ZGd„de«ZGd„de«Zy)z Accessors for arrow-backed data.é)Ú annotations)ÚABCMetaÚabstractmethod)Ú TYPE_CHECKINGÚcast)Úpa_version_under10p1Úpa_version_under11p0)Ú is_list_likeN)Ú
ArrowDtype)ÚIterator)Ú    DataFrameÚSeriescóF—eZdZedd„«Zedd„«Zd„Zed„«Zy)Ú ArrowAccessorcóB—||_||_|j|«y©N)Ú_dataÚ_validation_msgÚ    _validate)ÚselfÚdataÚvalidation_msgs   úUH:\Change_password\venv_build\Lib\site-packages\pandas/core/arrays/arrow/accessors.pyÚ__init__zArrowAccessor.__init__%s€àˆŒ
Ø-ˆÔØ ‰tÕócó—yr©©rÚ pyarrow_dtypes  rÚ_is_valid_pyarrow_dtypez%ArrowAccessor._is_valid_pyarrow_dtype+s€à rcó—|j}tst|t«s%t    |j
j |¬««‚|j|j«s%t    |j
j |¬««‚y)N©Údtype)    r#rÚ
isinstancer ÚAttributeErrorrÚformatr r)rrr#s   rrzArrowAccessor._validate/so€Ø—
‘
ˆÝ ¤z°%¼Ô'Dä  ×!5Ñ!5×!<Ñ!<À5Ð!<Ó!IÓJÐ Jà×+Ñ+¨E×,?Ñ,?Ô@ä  ×!5Ñ!5×!<Ñ!<À5Ð!<Ó!IÓJÐ JðArcóB—|jjjSr)rÚarrayÚ    _pa_array©rs rr)zArrowAccessor._pa_array9s€àz‰z×Ñ×)Ñ)Ð)rN)rÚstrÚreturnÚNone©r,Úbool)    Ú__name__Ú
__module__Ú __qualname__rrr rÚpropertyr)rrrrr$sB„Øòóðð
ò óð òKðñ*óñ*rr)Ú    metaclasscóN‡—eZdZdZdd    ˆfd„ Zd
d„Zd d„Zd d„Zd d„Zd d„Z    ˆxZ
S)Ú ListAccessorz¤
    Accessor object for list data properties of the Series values.
 
    Parameters
    ----------
    data : Series
        Series containing Arrow list data.
    có(•—t‰||d¬«y)NzJCan only use the '.list' accessor with 'list[pyarrow]' dtype, not {dtype}.©r©Úsuperr©rrÚ    __class__s  €rrzListAccessor.__init__Hsø€Ü ‰ÑØ ð2ð    õ    
rcóėtjj|«xs@tjj|«xstjj    |«Sr)ÚpaÚtypesÚis_listÚis_fixed_size_listÚ is_large_listrs  rr z$ListAccessor._is_valid_pyarrow_dtypeOsG€ä H‰H× Ñ ˜]Ó +ò 5܏x‰x×*Ñ*¨=Ó9ò 5äx‰x×%Ñ% mÓ4ð    
rcó†—ddlm}tj|j«}||t |j «¬«S)a
        Return the length of each list in the Series.
 
        Returns
        -------
        pandas.Series
            The length of each list.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         [1, 2, 3],
        ...         [3],
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.list_(
        ...         pa.int64()
        ...     ))
        ... )
        >>> s.list.len()
        0    3
        1    1
        dtype: int32[pyarrow]
        r©rr")ÚpandasrÚpcÚlist_value_lengthr)r Útype)rrÚ value_lengthss   rÚlenzListAccessor.lenVs3€õ4    "ä×,Ñ,¨T¯^©^Ó<ˆ ِm¬:°m×6HÑ6HÓ+IÔJÐJrcó&—ddlm}t|t«r=t    j
|j |«}||t|j«¬«St|t«rŽtrtdtj›d«‚|j|j|j }}}|€d}|€d}t    j"|j |||«}||t|j«¬«St%dt|«j&›«‚)a’
        Index or slice lists in the Series.
 
        Parameters
        ----------
        key : int | slice
            Index or slice of indices to access from each list.
 
        Returns
        -------
        pandas.Series
            The list at requested index.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         [1, 2, 3],
        ...         [3],
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.list_(
        ...         pa.int64()
        ...     ))
        ... )
        >>> s.list[0]
        0    1
        1    3
        dtype: int64[pyarrow]
        rrDr"z$List slice not supported by pyarrow ú.éz!key must be an int or slice, got )rErr$ÚintrFÚ list_elementr)r rHÚslicer    ÚNotImplementedErrorr>Ú __version__ÚstartÚstopÚstepÚ
list_sliceÚ
ValueErrorr0)rÚkeyrÚelementrSrTrUÚsliceds        rÚ __getitem__zListAccessor.__getitem__uså€õ>    "ä cœ3Ô ô
—o‘o d§n¡n°cÓ:ˆGÙ˜'¬°G·L±LÓ)AÔBÐ BÜ ˜œUÔ #Ý#Ü)Ø:¼2¿>¹>Ð:JÈ!ÐLóðð !$§    ¡    ¨3¯8©8°S·X±X˜4ˆE؈}ðØˆ|ؐܗ]‘] 4§>¡>°5¸$ÀÓEˆFÙ˜&¬
°6·;±;Ó(?Ô@Ð @äÐ@ÄÀcÃ×ASÑASÐ@TÐUÓVÐ VrcóF—tdt|«j›d«‚)Nú'z' object is not iterable)Ú    TypeErrorrHr0r*s rÚ__iter__zListAccessor.__iter__²s"€Ü˜!œD ›J×/Ñ/Ð0Ð0HÐIÓJÐJrcó†—ddlm}tj|j«}||t |j «¬«S)a;
        Flatten list values.
 
        Returns
        -------
        pandas.Series
            The data from all lists in the series flattened.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         [1, 2, 3],
        ...         [3],
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.list_(
        ...         pa.int64()
        ...     ))
        ... )
        >>> s.list.flatten()
        0    1
        1    2
        2    3
        3    3
        dtype: int64[pyarrow]
        rrDr")rErrFÚ list_flattenr)r rH)rrÚ    flatteneds   rÚflattenzListAccessor.flattenµs/€õ8    "ä—O‘O D§N¡NÓ3ˆ    Ùi¤z°)·.±.Ó'AÔBÐBrr©r,r-r.©r,r)rXz int | slicer,r)r,r ) r0r1r2Ú__doc__rr rJr[r_rcÚ __classcell__©r<s@rr6r6>s+ø„ñö
ó
óKó>;WózK÷Crr6cóX‡—eZdZdZddˆfd„ Zd    d„Zed
d„«Z                d d„Zd d„Z    ˆxZ
S) ÚStructAccessorz¬
    Accessor object for structured data properties of the Series values.
 
    Parameters
    ----------
    data : Series
        Series containing Arrow struct data.
    có(•—t‰||d¬«y)NzNCan only use the '.struct' accessor with 'struct[pyarrow]' dtype, not {dtype}.r8r9r;s  €rrzStructAccessor.__init__ásø€Ü ‰ÑØ ð&ð    õ    
rcó@—tjj|«Sr)r>r?Ú    is_structrs  rr z&StructAccessor._is_valid_pyarrow_dtypeês€Üx‰x×!Ñ! -Ó0Ð0rcóü—ddlm}m}|jjj
}|Dcgc]}t |j«‘Œ}}|Dcgc]}|j‘Œ}}||||«¬«Scc}wcc}w)að
        Return the dtype object of each child field of the struct.
 
        Returns
        -------
        pandas.Series
            The data type of each child field.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         {"version": 1, "project": "pandas"},
        ...         {"version": 2, "project": "pandas"},
        ...         {"version": 1, "project": "numpy"},
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.struct(
        ...         [("version", pa.int64()), ("project", pa.string())]
        ...     ))
        ... )
        >>> s.struct.dtypes
        version     int64[pyarrow]
        project    string[pyarrow]
        dtype: object
        r)ÚIndexr)Úindex)    rErorrr#rr rHÚname)rrorÚpa_typeÚstructr?Únamess       rÚdtypeszStructAccessor.dtypesísk€÷8    
ð
—*‘*×"Ñ"×0Ñ0ˆØ7>Ö?¨V”˜FŸK™KÕ(Ð?ˆÐ?Ø+2Ö3 —“Ð3ˆÐ3ِe¡5¨£<Ô0Ð0ùò@ùÚ3s ­A4ÁA9có‡—ddlm}                dˆfd„ Š|jjj}‰||«}t j ||«}||t|j«|jj|¬«S)aÃ
        Extract a child field of a struct as a Series.
 
        Parameters
        ----------
        name_or_index : str | bytes | int | expression | list
            Name or index of the child field to extract.
 
            For list-like inputs, this will index into a nested
            struct.
 
        Returns
        -------
        pandas.Series
            The data corresponding to the selected child field.
 
        See Also
        --------
        Series.struct.explode : Return all child fields as a DataFrame.
 
        Notes
        -----
        The name of the resulting Series will be set using the following
        rules:
 
        - For string, bytes, or integer `name_or_index` (or a list of these, for
          a nested selection), the Series name is set to the selected
          field's name.
        - For a :class:`pyarrow.compute.Expression`, this is set to
          the string form of the expression.
        - For list-like `name_or_index`, the name will be set to the
          name of the final field selected.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         {"version": 1, "project": "pandas"},
        ...         {"version": 2, "project": "pandas"},
        ...         {"version": 1, "project": "numpy"},
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.struct(
        ...         [("version", pa.int64()), ("project", pa.string())]
        ...     ))
        ... )
 
        Extract by field name.
 
        >>> s.struct.field("project")
        0    pandas
        1    pandas
        2     numpy
        Name: project, dtype: string[pyarrow]
 
        Extract by field index.
 
        >>> s.struct.field(0)
        0    1
        1    2
        2    1
        Name: version, dtype: int64[pyarrow]
 
        Or an expression
 
        >>> import pyarrow.compute as pc
        >>> s.struct.field(pc.field("project"))
        0    pandas
        1    pandas
        2     numpy
        Name: project, dtype: string[pyarrow]
 
        For nested struct types, you can pass a list of values to index
        multiple levels:
 
        >>> version_type = pa.struct([
        ...     ("major", pa.int64()),
        ...     ("minor", pa.int64()),
        ... ])
        >>> s = pd.Series(
        ...     [
        ...         {"version": {"major": 1, "minor": 5}, "project": "pandas"},
        ...         {"version": {"major": 2, "minor": 1}, "project": "pandas"},
        ...         {"version": {"major": 1, "minor": 26}, "project": "numpy"},
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.struct(
        ...         [("version", version_type), ("project", pa.string())]
        ...     ))
        ... )
        >>> s.struct.field(["version", "minor"])
        0     5
        1     1
        2    26
        Name: minor, dtype: int64[pyarrow]
        >>> s.struct.field([0, 0])
        0    1
        1    2
        2    1
        Name: major, dtype: int64[pyarrow]
        rrDcó,•—t|t«r'|jj|«j}|St|t
t f«r|}|St|tj«r t |«}|St|«r†tt|««}|}|rltt|«}|j«}‰||«}|jj|jj|««}|j}|rŒlStd«‚)NzVname_or_index must be an int, str, bytes, pyarrow.compute.Expression, or list of those)r$rNrHÚfieldrqr+ÚbytesrFÚ
Expressionr
ÚlistÚreversedrÚpopÚget_field_indexrW)Úlevel_name_or_indexrrqÚselectedÚ name_or_indexÚget_names     €rr‚z&StructAccessor.field.<locals>.get_nameƒsø€ôÐ-¬sÔ3Ø—y‘y—‘Ð':Ó;×@Ñ@ð0ˆKô/Ð/´#´u°Ô>Ø*ð,ˆKô+Ð/´·±Ô?ÜÐ.Ó/ð(ˆKô'Ð1Ô2ô'+¬8Ð4GÓ+HÓ&IÐ#ؐÙ)ô+/¬tÐ5HÓ*IÐ'Ø$7×$;Ñ$;Ó$=MÙ# M°8Ó<DØ'Ÿ}™}×2Ñ2°8·=±=×3PÑ3PÐQUÓ3VÓWHØ#Ÿ=™=Dò*ðˆKô    !ðCóðr)r#rprq)rúGlist[str] | list[bytes] | list[int] | pc.Expression | bytes | str | intrzpa.ChunkedArray)
rErrr(r)rFÚ struct_fieldr rHrp)rrrÚpa_arrrqÚ    field_arrr‚s      @rrxzStructAccessor.fields‚ø€õ\    "ð#    ð"ð#    ð"õ#    ðJ—‘×!Ñ!×+Ñ+ˆÙ˜  vÓ.ˆÜ—O‘O F¨MÓ:ˆ    áØ Ü˜YŸ^™^Ó,Ø—*‘*×"Ñ"Øô    
ð    
rcó¸—ddlm}|jj}|t    |j
«Dcgc]}|j |«‘Œc}d¬«Scc}w)at
        Extract all child fields of a struct as a DataFrame.
 
        Returns
        -------
        pandas.DataFrame
            The data corresponding to all child fields.
 
        See Also
        --------
        Series.struct.field : Return a single child field as a Series.
 
        Examples
        --------
        >>> import pyarrow as pa
        >>> s = pd.Series(
        ...     [
        ...         {"version": 1, "project": "pandas"},
        ...         {"version": 2, "project": "pandas"},
        ...         {"version": 1, "project": "numpy"},
        ...     ],
        ...     dtype=pd.ArrowDtype(pa.struct(
        ...         [("version", pa.int64()), ("project", pa.string())]
        ...     ))
        ... )
 
        >>> s.struct.explode()
           version project
        0        1  pandas
        1        2  pandas
        2        1   numpy
        r)ÚconcatÚcolumns)Úaxis)rErˆr)rHÚrangeÚ
num_fieldsrx)rrˆrrÚis    rÚexplodezStructAccessor.explode³sJ€õB    "à—.‘.×%Ñ%ˆÙÜ$)¨'×*<Ñ*<Ó$=Ö >˜qˆTZ‰Z˜]Ò >ÀYô
ð    
ùÚ >s¶Arrdr.re)rrƒr,r)r,r ) r0r1r2rfrr r3rurxrŽrgrhs@rrjrj×sIø„ñö
ó1ðò#1óð#1ðJ^
ðð^
ð
ó^
÷@&
rrj)rfÚ
__future__rÚabcrrÚtypingrrÚ pandas.compatrr    Úpandas.core.dtypes.commonr
Úpyarrowr>Úpyarrow.computeÚcomputerFÚpandas.core.dtypes.dtypesr Úcollections.abcr rEr rrr6rjrrrú<module>r™saðÙ&å"÷÷÷
õ
3áÛÝ å4áÝ(÷ô *˜gõ*ô4VC=ôVCôrB
]õB
r