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
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
Ë
nñúhÛ'ã    óX—dZddlmZddlmZddlZddlZddlmZddl    Z    ddl
Z
ddl Z ddl Z ddl mZddlZddlmZddlmZed    «Zed
«ZGd „d eeef«Z    d            dd„Zdd„Zdd„Zeej
ddeeej:ej:dœZdd„ZGd„d «Z y)z
Module for scope operations
é)Ú annotations)ÚChainMapN)ÚStringIO)ÚTypeVar)Ú    Timestamp)ÚUndefinedVariableErrorÚ_KTÚ_VTcó —eZdZdZdd„Zdd„Zy)Ú DeepChainMapz~
    Variant of ChainMap that allows direct updates to inner scopes.
 
    Only works when all passed mapping are mutable.
    có`—|jD] }||vsŒ|||<y||jd|<y)Nr)Úmaps)ÚselfÚkeyÚvalueÚmappings    úPH:\Change_password\venv_build\Lib\site-packages\pandas/core/computation/scope.pyÚ __setitem__zDeepChainMap.__setitem__!s<€Ø—y‘yò    ˆGؐgŠ~Ø$˜‘ Ùð    ð"ˆ    ‰    !‰ SÒócóL—|jD] }||vsŒ||=yt|«‚)z\
        Raises
        ------
        KeyError
            If `key` doesn't exist.
        N)rÚKeyError)rrrs   rÚ __delitem__zDeepChainMap.__delitem__(s4€ð—y‘yò    ˆGؐgŠ~ؘCLÙð    ôs‹mÐrN)rr    rr
ÚreturnÚNone)rr    rr)Ú__name__Ú
__module__Ú __qualname__Ú__doc__rr©rrr r s„ñó "ô rr ÚScopecó(—t|dz||||¬«S)z.Ensure that we are grabbing the correct scope.é)Ú global_dictÚ
local_dictÚ    resolversÚtarget)r )Úlevelr#r$r%r&s     rÚ ensure_scoper(6s$€ô Ø ‰    ØØØØô  ðrcóf—    t|«}t|«S#t$r|}Yt|«SwxYw)z‚
    Replace a number with its hexadecimal representation. Used to tag
    temporary variables with their calling scope's id.
    )ÚordÚ    TypeErrorÚhex)ÚxÚhexins  rÚ    _replacerr/Cs<€ðܐA“ˆô
ˆu‹:Ðøô     òà‰ä ˆu‹:Ðð    ús ‚ ˜ 0¯0cóš—tjdt|««}dj|Dcgc] }t    |«‘Œc}«Scc}w)z,Return the padded hexadecimal id of ``obj``.z@PÚ)ÚstructÚpackÚidÚjoinr/)ÚobjÚpackedr-s   rÚ _raw_hex_idr8Ss9€ô[‰[˜œr #›wÓ '€FØ 7‰7¨&Ö1 Q”I˜a•LÒ1Ó 2Ð2ùÒ1s¯ATF)rÚdatetimeÚTrueÚFalseÚlistÚtupleÚinfÚInfcód—t«}tj||¬«|j«S)z¼
    Return a prettier version of obj.
 
    Parameters
    ----------
    obj : object
        Object to pretty print
 
    Returns
    -------
    str
        Pretty print object repr
    )Ústream)rÚpprintÚgetvalue)r6Úsios  rÚ_get_pretty_stringrEfs%€ô ‹*€CÜ
‡MM#˜cÕ"Ø <‰<‹>Ðrcó¼—eZdZUdZgd¢Zded<ded<ded<ded    <    d            dd „Zdd „Zedd „«Z    dd„Z
ddd„Z dd„Z dd„Z dd„Zedd„«Zedd„«Zy
)r aÒ
    Object to hold scope, with a few bells to deal with some custom syntax
    and contexts added by pandas.
 
    Parameters
    ----------
    level : int
    global_dict : dict or None, optional, default None
    local_dict : dict or Scope or None, optional, default None
    resolvers : list-like or None, optional, default None
    target : object
 
    Attributes
    ----------
    level : int
    scope : DeepChainMap
    target : object
    temps : dict
    )r'Úscoper&r%ÚtempsÚintr'r rGr%ÚdictrHNcóZ—|dz|_ttj««|_||_t |t«r]|jj|j«|j
|j
|_|j|j«tj|j«}    |jj||n |jj««}t|«|_t |t«sG|jj||n |jj««}t|«|_~t |t«r"|t|j j"«z }t|Ž|_i|_y#~wxYw)Nr")r'r ÚDEFAULT_GLOBALSÚcopyrGr&Ú
isinstancer ÚupdateÚ_updateÚsysÚ    _getframeÚ    new_childÚ    f_globalsÚf_localsr=r%rrH)    rr'r#r$r%r&ÚframeÚ scope_globalÚ scope_locals             rÚ__init__zScope.__init__”sS€ð˜Q‘YˆŒ
ô"¤/×"6Ñ"6Ó"8Ó9ˆŒ
؈Œ ä j¤%Ô (Ø J‰J× Ñ ˜j×.Ñ.Ô /Ø× Ñ Ð,Ø(×/Ñ/” Ø L‰L˜×)Ñ)Ô *ä— ‘ ˜dŸj™jÓ)ˆð    ð Ÿ:™:×/Ñ/Ø +Р7‘¸U¿_¹_×RÑRÓTóˆLô& lÓ3ˆDŒJܘj¬%Ô0Ø"Ÿj™j×2Ñ2Ø#-Ð#9‘Z¸u¿~¹~×SÑSÓUó ô*¨+Ó6”
àô j¤%Ô (Ø œ˜z×3Ñ3×8Ñ8Ó9Ñ 9ˆIÜ% yÐ1ˆŒØˆ
øñ ús ÃBF'Æ'F*cóî—tt|jj«««}tt|jj«««}t |«j ›d|›d|›dS)Nz(scope=z , resolvers=ú))rEr<rGÚkeysr%Útyper)rÚ
scope_keysÚres_keyss   rÚ__repr__zScope.__repr__¼s\€Ü'¬¨T¯Z©Z¯_©_Ó->Ó(?Ó@ˆ
Ü%¤d¨4¯>©>×+>Ñ+>Ó+@Ó&AÓBˆÜt“*×%Ñ%Ð& g¨j¨\¸ÀhÀZÈqÐQÐQrcó>—tt|j««S)zõ
        Return whether we have any extra scope.
 
        For example, DataFrames pass Their columns as resolvers during calls to
        ``DataFrame.eval()`` and ``DataFrame.query()``.
 
        Returns
        -------
        hr : bool
        )ÚboolÚlenr%©rs rÚ has_resolverszScope.has_resolversÁs€ô”C˜Ÿ™Ó'Ó(Ð(rcó—    |r|j|S|jr|j|S|s |jrJ‚|j|S#t$r1    |j|cYS#t$r}t ||«|‚d}~wwxYwwxYw)a†
        Resolve a variable name in a possibly local context.
 
        Parameters
        ----------
        key : str
            A variable name
        is_local : bool
            Flag indicating whether the variable is local or not (prefixed with
            the '@' symbol)
 
        Returns
        -------
        value : object
            The value of a particular variable
        N)rGrer%rrHr)rrÚis_localÚerrs    rÚresolvez Scope.resolveÏsœ€ð"    EáØ—z‘z #‘Ð&ð×!Ò!Ø—~‘~ cÑ*Ð*ñ ¨×(:Ò(:Ð :Ð:Ø—:‘:˜c‘?Ð "øÜò    Eð Eð—z‘z #‘Ò&øÜò EÜ,¨S°(Ó;ÀÐDûð Eúð     Eús9‚A “A ®A Á     BÁA(Á%BÁ(    BÁ1 A>Á>BÂBcóþ—|jr.|jj|jjz}n|jj}|j    |j
«|D] }||vsŒ|||<yy)a]
        Replace a variable name, with a potentially new value.
 
        Parameters
        ----------
        old_key : str
            Current variable name to replace
        new_key : str
            New variable name to replace `old_key` with
        new_value : object
            Value to be replaced along with the possible renaming
        N)rer%rrGÚappendrH)rÚold_keyÚnew_keyÚ    new_valuerrs      rÚswapkeyz Scope.swapkeyösj€ð × Ò Ø—>‘>×&Ñ&¨¯©¯©Ñ8‰Dà—:‘:—?‘?ˆDà  ‰ D—J‘JÔàò    ˆGؘ'Ò!Ø#,˜Ñ Ùñ    rcóҗtj||«}|D]F\}\}}}}}}    t|d|›«}t|jj |««|_~ŒHy#~wxYw)a‰
        Get specifically scoped variables from a list of stack frames.
 
        Parameters
        ----------
        stack : list
            A list of stack frames as returned by ``inspect.stack()``
        scopes : sequence of strings
            A sequence containing valid stack frame attribute names that
            evaluate to a dictionary. For example, ('locals', 'globals')
        Úf_N)Ú    itertoolsÚproductÚgetattrr rGrS)rÚstackÚscopesÚ    variablesrGrVÚ_Úds        rÚ    _get_varszScope._get_varssu€ô×%Ñ% f¨eÓ4ˆ    Ø-6ò    Ñ )ˆEÑ)E˜1˜a  A qð ܘE R¨ w <Ó0Ü)¨$¯*©*×*>Ñ*>¸qÓ*AÓB”
ñ
ñ    øñús §8A#Á#A&cóˆ—|dz}tj«}    |j|d|dg¬«|dd…=~y#|dd…=~wxYw)zƒ
        Update the current scope by going back `level` levels.
 
        Parameters
        ----------
        level : int
        r"NÚlocals)rv)Úinspectrurz)rr'Úslrus    rrPz Scope._update&sJ€ðQ‰Yˆô
— ‘ “ˆð     Ø N‰N˜5  "˜:¨x¨jˆNÔ 9à’a™%ø’a™%ús    ›9¹Acóėt|«j›d|j›dt|«›}||jvsJ‚||j|<||jvsJ‚|S)a#
        Add a temporary variable to the scope.
 
        Parameters
        ----------
        value : object
            An arbitrary object to be assigned to a temporary variable.
 
        Returns
        -------
        str
            The name of the temporary variable created.
        rx)r]rÚntempsr8rH)rrÚnames   rÚadd_tmpz Scope.add_tmp:sj€ôu“+×&Ñ&Ð' q¨¯©¨ °Q´{À4Ó7HÐ6IÐJˆð˜4Ÿ:™:Ñ%Ð%Ð%Ø ˆ
‰
4ÑØt—z‘zÑ!Ð!Ð!ðˆ rcó,—t|j«S)z/The number of temporary variables in this scope)rcrHrds rr€z Scope.ntempsRs€ô4—:‘:‹Ðrcóˆ—|jg|jjz|jjz}t    |ŽS)zÑ
        Return the full scope for use with passing to engines transparently
        as a mapping.
 
        Returns
        -------
        vars : DeepChainMap
            All variables in this scope.
        )rHr%rrGr )rrs  rÚ
full_scopezScope.full_scopeWs6€ð—
‘
ˆ|˜dŸn™n×1Ñ1Ñ1°D·J±J·O±OÑCˆÜ˜TÐ"Ð"r©NNrN)r'rIrr©rÚstr)rrb)rrˆrgrb)N)rlrˆrmrˆrr)rvz    list[str]rr)rrI)rr )rrrrÚ    __slots__Ú__annotations__rYr`ÚpropertyrerirorzrPr‚r€r…rrrr r ysŸ…ñò(C€IØ ƒJØ ÓØÓØ ƒKðSWð&Øð&à     ó&óPRð
ò )óð )ó%EôNó2ó. ó(ð0òóððò #óñ #rr†)r'rIrr r‡)!rÚ
__future__rÚ collectionsrr9r}ÚiorrrrBr2rQÚtypingrÚnumpyÚnpÚpandas._libs.tslibsrÚ pandas.errorsrr    r
r r(r/r8r<r=r>rLrEr rrrú<module>r”sÀðñõ#å ÛÛÝÛÛ Û Û
Ýãå)Ý0á ˆeƒn€Ù ˆeƒn€ô8˜C ˜HÑ%ôð:IMð
Ø ð
à
ó
ó ó 3ðØ×!Ñ!Ø Ø Ø Ø Ø 6‰6Ø 6‰6ñ    €ó÷&j#òj#r