hyb
2025-11-18 7539e6f48c75dcaeb808359cccfd1c0d0d182ce8
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
Ë
nñúhÿãó˜—dZddlmZddlmZddlmZddlZddlZddl    m
Z
e
rddl m Z m Z dZdd    „Zdd
„Zdd „Z                                dd „Zdd „Zy)z6
:func:`~pandas.eval` source string parsing functions
é)Ú annotations)ÚStringIO)Ú    iskeywordN)Ú TYPE_CHECKING)ÚHashableÚIteratorédc ó¼—|j«r t|«s|Stjj    «Dcic]\}}|dt
j |›d“Œ}}}|jddddddddd    œ«d
j|Dcgc]}|j||«‘Œc}«}d |›}|j«std |›d «‚|Scc}}wcc}w)a=
    Create valid Python identifiers from any string.
 
    Check if name contains any special characters. If it contains any
    special characters, the special characters will be replaced by
    a special string and a prefix is added.
 
    Raises
    ------
    SyntaxError
        If the returned name is not a Python valid identifier, raise an exception.
        This can happen if there is a hashtag in the name, as the tokenizer will
        than terminate and not find the backtick.
        But also for characters that fall out of the range of (U+0001..U+007F).
    Ú_Ú_QUESTIONMARK_Ú_EXCLAMATIONMARK_Ú _DOLLARSIGN_Ú
_EUROSIGN_Ú _DEGREESIGN_Ú _SINGLEQUOTE_Ú _DOUBLEQUOTE_)ú ú?ú!ú$u€õ°ú'ú"ÚÚBACKTICK_QUOTED_STRING_zCould not convert 'z' to a valid Python identifier.) Ú isidentifierrÚtokenizeÚEXACT_TOKEN_TYPESÚitemsÚtokenÚtok_nameÚupdateÚjoinÚgetÚ SyntaxError)ÚnameÚcharÚtokvalÚspecial_characters_replacementss    úRH:\Change_password\venv_build\Lib\site-packages\pandas/core/computation/parsing.pyÚcreate_valid_python_identifierr+sû€ð  ×ÑÔ¤9¨T¤?؈ ô&×7Ñ7×=Ñ=Ó?÷'á ˆD&ð     ”%—.‘. Ñ(Ð)¨Ð+Ñ+ð'Ð#ñ'ð$×*Ñ*àØ!Ø$ØØØ à Ø ñ     
ô𠠏7‰7ÐPTÖUÈÐ3×7Ñ7¸¸dÕCÒUÓ V€DØ $ T FÐ +€Dà × Ñ Ô ÜÐ/°¨vÐ5TÐUÓVÐVà €Kùó5'ùò(Vs ¿"C Ccó\—|\}}|tk(rtjt|«fS||fS)a[
    Clean up a column name if surrounded by backticks.
 
    Backtick quoted string are indicated by a certain tokval value. If a string
    is a backtick quoted token it will processed by
    :func:`_create_valid_python_identifier` so that the parser can find this
    string when the query is executed.
    In this case the tok will get the NAME tokval.
 
    Parameters
    ----------
    tok : tuple of int, str
        ints correspond to the all caps constants in the tokenize module
 
    Returns
    -------
    tok : Tuple[int, str]
        Either the input or token or the replacement values
    )ÚBACKTICK_QUOTED_STRINGrÚNAMEr+)ÚtokÚtoknumr(s   r*Úclean_backtick_quoted_toksr1Is5€ð(N€FˆFØ Ô'Ò'܏}‰}Ô<¸VÓDÐDÐDØ 6ˆ>Ðócóv—    td|›d«}t|«d}t|«S#t$r|cYSwxYw)a¼
    Function to emulate the cleaning of a backtick quoted name.
 
    The purpose for this function is to see what happens to the name of
    identifier if it goes to the process of being parsed a Python code
    inside a backtick quoted string and than being cleaned
    (removed of any special characters).
 
    Parameters
    ----------
    name : hashable
        Name to be cleaned.
 
    Returns
    -------
    name : hashable
        Returns the name after tokenizing and cleaning.
 
    Notes
    -----
        For some cases, a name cannot be converted to a valid Python identifier.
        In that case :func:`tokenize_string` raises a SyntaxError.
        In that case, we just return the name unmodified.
 
        If this name was used in the query string (this makes the query call impossible)
        an error will be raised by :func:`tokenize_backtick_quoted_string` instead,
        which is not caught and propagates to the user level.
    ú`é)Útokenize_stringÚnextr+r%)r&Ú    tokenizedr(s   r*Úclean_column_namer9csF€ð:Ü# a¨ v¨Q KÓ0ˆ    Üi“ Ñ#ˆÜ-¨fÓ5Ð5øÜ òØŠ ðús ‚'*ª 8·8cóJ—|D]\}}}}}|dk(sŒ|d}nt||fS)a»
    Creates a token from a backtick quoted string.
 
    Moves the token_generator forwards till right after the next backtick.
 
    Parameters
    ----------
    token_generator : Iterator[tokenize.TokenInfo]
        The generator that yields the tokens of the source string (Tuple[int, str]).
        The generator is at the first token after the backtick (`)
 
    source : str
        The Python source code string.
 
    string_start : int
        This is the start of backtick quoted string inside the source string.
 
    Returns
    -------
    tok: Tuple[int, str]
        The token that represents the backtick quoted string.
        The integer is equal to BACKTICK_QUOTED_STRING (100).
    r4r5)r-)Útoken_generatorÚsourceÚ string_startr r(ÚstartÚ
string_ends       r*Útokenize_backtick_quoted_stringr@ˆsE€ð4#2òшˆ65˜!˜QØ S‹=ؘq™ˆJÙ ðô
" 6¨,°zÐ#BÐ BÐBr2c#óK—t|«j}tj|«}|D]+\}}}}}|dk(r    t    |||ddz¬«–—Œ&||f–—Œ-y#t
$r}t d|›d«|‚d}~wwxYw­w)a$
    Tokenize a Python source code string.
 
    Parameters
    ----------
    source : str
        The Python source code string.
 
    Returns
    -------
    tok_generator : Iterator[Tuple[int, str]]
        An iterator yielding all tokens with only toknum and tokval (Tuple[ing, str]).
    r4r5)r=zFailed to parse backticks in 'z'.N)rÚreadlinerÚgenerate_tokensr@Ú    Exceptionr%)r<Ú line_readerr;r0r(r>r Úerrs        r*r6r6ªs¤èø€ô˜6Ó"×+Ñ+€KÜ×.Ñ.¨{Ó;€Oð(7ò    !Ñ#ˆ˜˜q !Ø SŠ=ð XÜ5Ø# V¸%À¹(ÀQ¹,ôóð ˜&.Ó  ñ    !øô ò XÜ!Ð$BÀ6À(È"Ð"MÓNÐTWÐWûð Xüs(‚;A?¾AÁ
A?Á    A<Á'A7Á7A<Á<A?)r&ÚstrÚreturnrG)r/útuple[int, str]rHrI)r&rrHr)r;zIterator[tokenize.TokenInfo]r<rGr=ÚintrHrI)r<rGrHzIterator[tuple[int, str]])Ú__doc__Ú
__future__rÚiorÚkeywordrr rÚtypingrÚcollections.abcrrr-r+r1r9r@r6©r2r*ú<module>rRsoðñõ#åÝÛ ÛÝ á÷ð Ðó0ófó4"ðJCØ1ðCØ;>ðCØNQðCàóCôD!r2