hyb
2025-11-10 e0a856b5072c5a09f3f6de6da85abf90e00ee704
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
Ë
nñúhæãó¼—dZddlmZddlZddlZddlmZddlmZmZddl    Z
ddl m Z m Z mZddlmZer
ddlmZmZmZd d    „Z                                        d d
„Z                                dd „Zy)z4
Methods used by Block.replace and related methods.
é)Ú annotationsN)ÚPattern)Ú TYPE_CHECKINGÚAny)Úis_boolÚis_reÚis_re_compilable)Úisna)Ú    ArrayLikeÚScalarÚnptcóŠ—t|«rd}|xr t|«}|xr"tj|«jdk7}|S)zG
    Decide whether to treat `to_replace` as a regular expression.
    TÚ)rr    ÚreÚcompileÚpattern)ÚregexÚ
to_replaces  úRH:\Change_password\venv_build\Lib\site-packages\pandas/core/array_algos/replace.pyÚshould_use_regexrsF€ô ˆZÔØˆà Ò 2Ô& zÓ2€Eð Ò :”b—j‘j Ó,×4Ñ4¸Ñ:€EØ €Lócó̇—t‰«r|S                        dd„}|r t|‰«sˆfd„}ntjˆfd„«}t    |tj
«rr|p||}||«}t    |tj
«rQtj |jtj¬«}tj|||«|}n||«}|||‰«|S)a„
    Compare two array-like inputs of the same shape or two scalar values
 
    Calls operator.eq or re.search, depending on regex argument. If regex is
    True, perform an element-wise regex matching.
 
    Parameters
    ----------
    a : array-like
    b : scalar or regex pattern
    regex : bool
    mask : np.ndarray[bool]
 
    Returns
    -------
    mask : array-like of bool
    c    ó—t|«rt|tj«rft    |«j
t    |«j
g}d|j ›d|d<tdt|d«›dt|d«›«‚yy)z‹
        Raises an error if the two arrays (a,b) cannot be compared.
        Otherwise, returns the comparison result as expected.
        zndarray(dtype=ú)rzCannot compare types z and éN)    rÚ
isinstanceÚnpÚndarrayÚtypeÚ__name__ÚdtypeÚ    TypeErrorÚrepr)ÚresultÚaÚbÚ
type_namess    rÚ_check_comparison_typesz8compare_or_regex_search.<locals>._check_comparison_typesDs…€ô 6Œ?œz¨!¬R¯Z©ZÔ8ܘq›'×*Ñ*¬D°«G×,<Ñ,<Ð=ˆJà,¨Q¯W©W¨I°QÐ7ˆJq‰MäØ'¬¨Z¸©]Ó(;Ð'<¸EÄ$ÀzÐRSÁ}ÓBUÐAVÐWóð ð  9ˆ?rcó0•—tj|‰«S©N)ÚoperatorÚeq©Úxr&s €rú<lambda>z)compare_or_regex_search.<locals>.<lambda>Vsø€”x—{‘{ 1 aÓ(€rcó’•—t|t«r5t‰ttf«rtt    j
‰|««SdS)NF)rÚstrrÚboolrÚsearchr-s €rr/z)compare_or_regex_search.<locals>.<lambda>Ys8ø€Ü˜!œSÔ!¤j°´S¼'°NÔ&Côœ2Ÿ9™9 Q¨›?Ó+€àðr)r!)r$zArrayLike | boolr%r r&úScalar | Pattern)
r
rrÚ    vectorizerrÚzerosÚshapeÚbool_Úplace)r%r&rÚmaskr(Úopr$Útmps `      rÚcompare_or_regex_searchr=-sÕø€ô( ˆA„w؈uˆ ðØ ðØ%.ðØ3Cóñ  Ô(¨°Ô2ã (‰ä \‰\ó ó
ˆô!”R—Z‘ZÔ  TÐ%5Ø ˆd‰GˆÙA“ˆä fœbŸj™jÔ )ô—(‘(˜4Ÿ:™:¬R¯X©XÔ6ˆCÜ H‰HS˜$ Ô '؉FáA“ˆá˜F A qÔ)Ø €MrcóN‡‡—t‰«st‰t«sˆˆfd„}nˆˆfd„}tj|tj
g¬«}|€ ||«|ddy|j |j k7r tj||j«}|||«||<y)zË
    Parameters
    ----------
    values : ArrayLike
        Object dtype.
    rx : re.Pattern
    value : Any
    mask : np.ndarray[bool], optional
 
    Notes
    -----
    Alters values in-place.
    cóh•—t‰«r%t|t«r‰j|«‰S|S|Sr*)rrr1r3©ÚsÚrxÚvalues €€rÚ re_replacerz"replace_regex.<locals>.re_replacer…s0ø€ÜRŒyœZ¨¬3Ô/Ø "§    ¡    ¨!£ Р8uÐ?¸aÐ?àrcób•—t‰«r"t|t«r‰j‰|«S|Sr*)rrr1Úsubr@s €€rrDz"replace_regex.<locals>.re_replacerŽs)ø€ÜRŒyœZ¨¬3Ô/Ø—v‘v˜e QÓ'Ð'àr)ÚotypesN)    r
rr1rr5Úobject_ÚndimÚ broadcast_tor7)ÚvaluesrBrCr:rDÚfs ``   rÚ replace_regexrMps~ù€ô& ˆE„{œ* U¬CÔ0ö    õ    ô       ‰ [¬"¯*©*¨Ô6€Aà €|ِf“Iˆ‰q‰    à ;‰;˜$Ÿ)™)Ò #Ü—?‘? 4¨¯©Ó6ˆDÙ˜ ™“ˆˆtŠ r)rr2rrÚreturnr2)
r%r r&r4rr2r:znpt.NDArray[np.bool_]rNr )rKr rBz
re.Patternr:znpt.NDArray[np.bool_] | NonerNÚNone)Ú__doc__Ú
__future__rr+rrÚtypingrrÚnumpyrÚpandas.core.dtypes.commonrrr    Úpandas.core.dtypes.missingr
Úpandas._typingr r r rr=rM©rrú<module>rXsœðñõ#ãÛ    Ý÷ó
÷ñõ
,á÷ñó ð@Øð@Ø%ð@Ø.2ð@Ø:Oð@àó@ðF+'Ø ð+'Ø%ð+'Ø4Pð+'à    ô+'r