hyb
2025-12-31 6cdcd01f77e11b72c323603e27ebdb85b15223c9
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
Ë
nñúh˜0ãó—ddlmZddlZddlmZmZmZddlZddl    m
Z
m Z ddl mZddlmZddlmZddlmZdd    lmZdd
lmZmZerddlZdd lmZmZmZmZm Z eGd „d e««Z!    d            dd„Z"Gd„de«Z#y)é)Ú annotationsN)Ú TYPE_CHECKINGÚClassVarÚcast)ÚlibÚmissing)Ú is_list_like)Úregister_extension_dtype)Úisna)Úops)Úmasked_accumulations)ÚBaseMaskedArrayÚBaseMaskedDtype)ÚDtypeÚDtypeObjÚSelfÚnptÚtype_tcó¤—eZdZUdZdZded<edd„«Zedd„«Zedd„«Z    e
dd„«Z dd    „Z edd
„«Z edd „«Z                dd „Zy )Ú BooleanDtypeaI
    Extension dtype for boolean data.
 
    .. warning::
 
       BooleanDtype is considered experimental. The implementation and
       parts of the API may change without warning.
 
    Attributes
    ----------
    None
 
    Methods
    -------
    None
 
    Examples
    --------
    >>> pd.BooleanDtype()
    BooleanDtype
    Úbooleanz ClassVar[str]Únamecó"—tjS©N)ÚnpÚbool_©Úselfs úMH:\Change_password\venv_build\Lib\site-packages\pandas/core/arrays/boolean.pyÚtypezBooleanDtype.typeDs €äx‰xˆócó—y)NÚb©rs rÚkindzBooleanDtype.kindHs€àr!có,—tjd«S)NÚbool)rÚdtypers rÚ numpy_dtypezBooleanDtype.numpy_dtypeLs€äx‰x˜ÓÐr!có—tS)zq
        Return the array type associated with this dtype.
 
        Returns
        -------
        type
        )Ú BooleanArray)Úclss rÚconstruct_array_typez!BooleanDtype.construct_array_typePs
€ôÐr!có—y)Nrr$rs rÚ__repr__zBooleanDtype.__repr__[s€Ør!có—y©NTr$rs rÚ _is_booleanzBooleanDtype._is_boolean^ó€àr!có—yr1r$rs rÚ _is_numericzBooleanDtype._is_numericbr3r!có—ddl}|j|j«k7r>|jj    |j«st d|j›d«‚t ||j«r|g}t|«}n|j}|j«}|jj    |j«rBtj|t¬«}tj|t¬«}t||«Sg}|D]    }|j!«}    |jj#|jt|«d|    dg|j$¬«j'd¬    «}|j(dk7rU|jj#|jt|«d|    dg|j$¬«j'd¬    «}|}n$tj*t|«t¬«}t||«}
|j-|
«Œ |sRttj.gtj¬«tj.gtj¬««Stj1|«S)
zI
        Construct BooleanArray from pyarrow Array/ChunkedArray.
        rNz$Expected array of boolean type, got z instead©r(é)ÚoffsetF)Úzero_copy_only)Úpyarrowr rÚtypesÚis_nullÚ    TypeErrorÚ
isinstanceÚArrayÚlenÚchunksÚlengthrÚonesr'Úemptyr+ÚbuffersÚ from_buffersr9Úto_numpyÚ
null_countÚzerosÚappendÚarrayÚ_concat_same_type) rrLr;rBrCÚmaskÚdataÚresultsÚarrÚbuflistÚbool_arrs            rÚ__from_arrow__zBooleanDtype.__from_arrow__fsú€ó     à :‰:˜˜Ÿ™›Ò (°·±×1FÑ1FÀuÇzÁzÔ1RÜÐBÀ5Ç:Á:À,ÈhÐWÓXÐ Xä e˜WŸ]™]Ô +ؐWˆFܘ“Z‰Fð—\‘\ˆFØ—\‘\“^ˆFà =‰=×  Ñ   §¡Ô ,Ü—7‘7˜6¬Ô.ˆDä—8‘8˜F¬$Ô/ˆDÜ  dÓ+Ð +àˆØó    %ˆCØ—k‘k“mˆGØ×'Ñ'×4Ñ4Ø—‘œ#˜c›( T¨7°1©:Ð$6¸s¿z¹zð5óç‰h eˆhÓ,ð ð~‰~ Ò"Ø×+Ñ+×8Ñ8Ø—H‘Hœc #›h¨¨w°q©zÐ(:À3Ç:Á:ð9óç‘(¨%(Ó0ððu‘ä—x‘x¤ C£´Ô5ä# D¨$Ó/ˆHØ N‰N˜8Ö $ð    %ñ ÜÜ—‘˜¤2§8¡8Ô,¬b¯h©h°rÄÇÁÔ.Jóð ô ×1Ñ1°'Ó:Ð :r!N)Úreturnr )rUÚstr)rUznp.dtype)rUztype_t[BooleanArray]©rUr')rLz$pyarrow.Array | pyarrow.ChunkedArrayrUr+)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rÚ__annotations__Úpropertyr r%r)Ú classmethodr-r/r2r5rTr$r!rrr(s¥…ñð,$€Dˆ-Ó#ðòóððòóððò óð ðòóðóðòóððòóðð/;Ø9ð/;à    ô/;r!rcóV—t|t«rK| td«‚|j|j}}|r |j «}|j «}||fSd}t|t j«r2|jt jk(r|rÈ|j «}n¶t|t j«r«|jjdvr“t|«}t jt|«t¬«}||jt«||<t j ||j|j«||k(«s t#d«‚|}nñt j$|t&¬«}t)j*|d¬«}d}|d    |zvr t#d«‚t-d
t|««}t jt|«t¬«}||jt«||<||vrQt j ||jt.«||jt.«k(«s t#d«‚|€(|€&t j|j0t¬«}ny|€|}ntt|t j«r8|jt jk(r|||z}n5|r3|j «}n"t j2|t¬«}|||z}|j0|j0k7r td «‚||fS) a
    Coerce the input values array to numpy arrays with a mask.
 
    Parameters
    ----------
    values : 1D list-like
    mask : bool 1D array, optional
    copy : bool, default False
        if True, copy the input
 
    Returns
    -------
    tuple of (values, mask)
    Nz'cannot pass mask for BooleanArray inputÚiufcbr7zNeed to pass bool-like valuesT©Úskipna)ÚfloatingÚintegerzmixed-integer-float)rrEúnpt.NDArray[np.bool_]z&values.shape and mask.shape must match)r?r+Ú
ValueErrorÚ_dataÚ_maskÚcopyrÚndarrayr(rr%r rJrAr'ÚastypeÚallr>ÚasarrayÚobjectrÚ infer_dtyperÚfloatÚshaperL)ÚvaluesrNriÚ mask_valuesÚ values_boolÚ values_objectÚinferred_dtypeÚ integer_likes        rÚcoerce_to_arrayrx˜s£€ô"&œ,Ô'Ø Ð ÜÐFÓGÐ GØ—|‘| V§\¡\ˆÙ Ø—[‘[“]ˆFØ—9‘9“;ˆDؐtˆ|Ðà€Kܐ&œ"Ÿ*™*Ô%¨&¯,©,¼"¿(¹(Ò*BÚ Ø—[‘[“]ŠFÜ    FœBŸJ™JÔ    '¨F¯L©L×,=Ñ,=ÀÑ,Hܘ6“lˆ ä—h‘hœs 6›{´$Ô7ˆ Ø$*¨K¨<Ñ$8×$?Ñ$?ÄÓ$Eˆ [LÑ!äv‰vØ ˜˜ Ñ %× ,Ñ ,¨V¯\©\Ó :¸fÀkÀ\Ñ>RÑ Rô
ôÐ;Ó<Ð <à‰äŸ
™
 6´Ô8ˆ 䟙¨¸tÔDˆØEˆ Ø Ð!5¸ Ñ!DÑ DÜÐ;Ó<Ð <ôÐ2´D¸Ó4GÓHˆ Ü—‘œ#˜f›+¬TÔ2ˆØ,¨k¨\Ñ:×AÑAÄ$ÓGˆ ˆ|Ñð ˜lÑ *Ü F‰Fؘ |Ñ$×+Ñ+¬EÓ2Ø  + Ñ.×5Ñ5´eÓ<ñ=ô ô
Ð;Ó<Ð <à €|˜ Ð+܏x‰x˜Ÿ ™ ¬DÔ1‰Ø     ˆØ‰ä dœBŸJ™JÔ '¨D¯J©J¼"¿(¹(Ò,BØÐ&ؘkÑ)‘áØŸ9™9›;‘Dä—8‘8˜D¬Ô-ˆDØÐ&ؘkÑ)à ‡||t—z‘zÒ!ÜÐAÓBÐBà 4ˆ<Ðr!có6‡—eZdZdZdZdZdZhd£Zhd£Ze    dˆfd„ «Z
    d                            dˆfd„ Z e dd„«Z e    d    dd    d    d
œ                                            dd „«Zej ej$eej(fZe    dd œ                    dd „«Zd„Zddœ                    dd„ZˆxZS)r+a=
    Array of boolean (True/False) data with missing values.
 
    This is a pandas Extension array for boolean data, under the hood
    represented by 2 numpy arrays: a boolean array with the data and
    a boolean array with the mask (True indicating missing).
 
    BooleanArray implements Kleene logic (sometimes called three-value
    logic) for logical operations. See :ref:`boolean.kleene` for more.
 
    To construct an BooleanArray from generic array-like input, use
    :func:`pandas.array` specifying ``dtype="boolean"`` (see examples
    below).
 
    .. warning::
 
       BooleanArray is considered experimental. The implementation and
       parts of the API may change without warning.
 
    Parameters
    ----------
    values : numpy.ndarray
        A 1-d boolean-dtype array with the data.
    mask : numpy.ndarray
        A 1-d boolean-dtype array indicating missing values (True
        indicates missing).
    copy : bool, default False
        Whether to copy the `values` and `mask` arrays.
 
    Attributes
    ----------
    None
 
    Methods
    -------
    None
 
    Returns
    -------
    BooleanArray
 
    Examples
    --------
    Create an BooleanArray with :func:`pandas.array`:
 
    >>> pd.array([True, False, None], dtype="boolean")
    <BooleanArray>
    [True, False, <NA>]
    Length: 3, dtype: boolean
    FT>ú1.0Ú1ÚTRUEÚTrueÚtrue>ú0.0Ú0ÚFALSEÚFalseÚfalsecóF•—t‰|||«}t«|_|Sr)ÚsuperÚ _simple_newrÚ_dtype)r,rrrNÚresultÚ    __class__s    €rr†zBooleanArray._simple_new-s"ø€ä‘Ñ$ V¨TÓ2ˆÜ$›ˆŒ ؈ r!có̕—t|tj«r|jtjk(s t d«‚t «|_t‰|%|||¬«y)NzIvalues should be boolean numpy array. Use the 'pd.array' function instead©ri)
r?rrjr(rr>rr‡r…Ú__init__)rrrrNrir‰s    €rrŒzBooleanArray.__init__3sSø€ô˜6¤2§:¡:Ô.°6·<±<Ä2Ç8Á8Ò3KÜð2óð ô#“nˆŒ Ü ‰Ñ˜ ¨DÐÕ1r!có—|jSr)r‡rs rr(zBooleanArray.dtype>s €à{‰{Ðr!N)r(riÚ true_valuesÚ false_valuescó>‡    ‡
—|jj|xsg«Š
|jj|xsg«Š    dˆ    ˆ
fd„ }tj|t
¬«}t |«}tt|||««||<|j|||¬«S)Ncó4•—|‰vry|‰vryt|›d«‚)NTFz cannot be cast to bool)rf)ÚsÚfalse_values_unionÚtrue_values_unions €€rÚ
map_stringz:BooleanArray._from_sequence_of_strings.<locals>.map_stringOs.ø€ØÐ%Ñ%ØØÐ(Ñ(Øä  A 3Ð&=Ð!>Ó?Ð?r!r7)r(rirW)
Ú _TRUE_VALUESÚunionÚ _FALSE_VALUESrrLrnr ÚlistÚmapÚ_from_sequence) r,Ústringsr(rirŽrr•ÚscalarsrNr“r”s          @@rÚ_from_sequence_of_stringsz&BooleanArray._from_sequence_of_stringsBs“ù€ð ×,Ñ,×2Ñ2°;Ò3DÀ"ÓEÐØ ×.Ñ.×4Ñ4°\Ò5GÀRÓHÐö    @ô—(‘(˜7¬&Ô1ˆÜG‹}ˆÜœc *¨g°t°e©nÓ=Ó>ˆ‰Ø×!Ñ! '°¸TÐ!ÓBÐBr!r‹có.—|r|dk(sJ‚t||¬«S)Nrr‹)rx)r,Úvaluer(ris    rÚ_coerce_to_arrayzBooleanArray._coerce_to_array^s"€ñ ؘIÒ%Ð %Ð%ܘu¨4Ô0Ð0r!cóè—|jdvsJ‚tj|«}d}t|t«r|j
|j }}nwt|«rBtj|d¬«}|jdkDr td«‚t|d¬«\}}n*t|tj«r|j«}|rI|tj ur7tj"|«s"t%dt'|«j›d    «‚|s"t)|«t)|«k7r t+d
«‚|jd vr0t-j.|j
||j |«\}}nm|jd vr0t-j0|j
||j |«\}}n/t-j2|j
||j |«\}}|j5||«S) N>Úor_ÚxorÚand_Úror_ÚrxorÚrand_r'r7r8z(can only perform ops with 1-d structuresFr‹z+'other' should be pandas.NA or a bool. Got z     instead.zLengths must match>r£r¦>r¥r¨)rXrÚ    is_scalarr?r+rgrhr    rrmÚndimÚNotImplementedErrorrxrÚitemÚ
libmissingÚNAÚis_boolr>r rArfr Ú    kleene_orÚ
kleene_andÚ
kleene_xorÚ_maybe_mask_result)rÚotherÚopÚother_is_scalarrNrˆs      rÚ_logical_methodzBooleanArray._logical_methodfs€Ø{‰{ÐMÑMÐMÐMÜŸ-™-¨Ó.ˆØˆä eœ\Ô *ØŸ+™+ u§{¡{4‰EÜ ˜%Ô  Ü—J‘J˜u¨FÔ3ˆE؏z‰z˜AŠ~Ü)Ð*TÓUÐUÜ)¨%°eÔ<‰KˆE‘4Ü ˜œrŸx™xÔ (Ø—J‘J“LˆEá ˜u¬J¯M©MÑ9Ä#Ç+Á+ÈeÔBTÜðܘE“{×+Ñ+Ð,¨Ið7óð ñ
¤3 t£9´°E³
Ò#:ÜÐ1Ó2Ð 2à ;‰;˜/Ñ )ÜŸ=™=¨¯©°U¸D¿J¹JÈÓM‰LˆF‘DØ [‰[Ð-Ñ -ÜŸ>™>¨$¯*©*°e¸T¿Z¹ZÈÓN‰LˆF‘DôŸ>™>¨$¯*©*°e¸T¿Z¹ZÈÓN‰LˆFDð×&Ñ& v¨tÓ4Ð4r!rac ó—|j}|j}|dvr1tt|«}|||fd|i|¤Ž\}}|j    ||«Sddlm}||jt«|«j|fd|i|¤ŽS)N)ÚcumminÚcummaxrbr)Ú IntegerArray)
rgrhÚgetattrr r†Úpandas.core.arraysr»rkÚintÚ _accumulate)rrrbÚkwargsrOrNrµr»s        rr¿zBooleanArray._accumulate‰s”€ðz‰zˆØz‰zˆØ Ð'Ñ 'ÜÔ-¨tÓ4ˆBÙ˜D $Ñ@¨vÐ@¸Ñ@‰JˆD$Ø×#Ñ# D¨$Ó/Ð /å 7àC‘< § ¡ ¬CÓ 0°$Ó7×CÑCØñØ#ðØ'-ñð r!)rrú
np.ndarrayrNrerUr)F)rrrÁrNrÁrir'rUÚNone)rUr) rœz    list[str]r(z Dtype | Nonerir'rŽúlist[str] | NonerrÃrUr+)r(rrir'rUútuple[np.ndarray, np.ndarray])rrVrbr'rUr)rXrYrZr[Ú_internal_fill_valueÚ _truthy_valueÚ _falsey_valuer–r˜r^r†rŒr]r(ržrrjÚnumbersÚNumberr'rÚ_HANDLED_TYPESr¡r·r¿Ú __classcell__)r‰s@rr+r+ïsNø„ñ1ðh!Ðð€MØ€MÚ7€LÚ;€Màôóðð BGð    2Ø ð    2Ø(2ð    2Ø:>ð    2à     õ    2ðòóððð
#ØØ(,Ø)-ñCàðCðð    Cð
ð Cð &ð Cð'ðCð
òCóðCð2—j‘j '§.¡.°$¸¿¹ÐA€Nàà5:ñ1Ø&ð1Ø.2ð1à    &ò1óð1ò!5ðH,0ñØðØ$(ðà    ÷r!r+)NF)rir'rUrÄ)$Ú
__future__rrÈÚtypingrrrÚnumpyrÚ pandas._libsrrr­Úpandas.core.dtypes.commonr    Úpandas.core.dtypes.dtypesr
Úpandas.core.dtypes.missingr Ú pandas.corer Úpandas.core.array_algosr Úpandas.core.arrays.maskedrrr;Úpandas._typingrrrrrrrxr+r$r!rú<module>r×s’ðÝ"ã÷ñó ÷õ
3Ý>Ý+åÝ8÷ñ
Û÷õðôl;?ól;óðl;ð`%*ðTØ!ðTà"óTônh?õhr!