hyb
2025-12-23 10f3a1daddfbc7fa3dd2069197d83e8b6ef19176
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
Ë
nñúh++ãó
—ddlmZddlmZmZddlZddlZddlm    Z    m
Z ddl m Z ddlmZddlmZddlmZmZmZmZmZmZmZmZmZdd    lmZdd
lmZm Z dd l!m"Z"dd l#m$Z$er
dd l%m&Z&m'Z'm(Z(dde    jRf                    dd„Z*y)é)Ú annotations)Ú TYPE_CHECKINGÚLiteralN)ÚlibÚmissing)Úfind_stack_level)Úcheck_dtype_backend)Úmaybe_downcast_numeric)    Ú ensure_objectÚ is_bool_dtypeÚ
is_decimalÚis_integer_dtypeÚ    is_numberÚis_numeric_dtypeÚ    is_scalarÚis_string_dtypeÚneeds_i8_conversion)Ú
ArrowDtype)ÚABCIndexÚ    ABCSeries)ÚBaseMaskedArray)Ú StringDtype)ÚDateTimeErrorChoicesÚ DtypeBackendÚnptÚraisec    ó8 —|dvr td«‚|dvr td«‚|dk(r$tjdtt    «¬«t |«d}d}d}t |t«rd    }|j}nÚt |t«r6d    }t|j«r|jd
«}n¡|j}n”t |ttf«rtj |d ¬ «}nft#|«r>t%|«r t'|«St)|«r|Sd    }tj |gd ¬ «}nt+|d d«dkDr t-d«‚|}|}d}    t |t.«r|j0}    |j2|    }t+|dd«}
t |
t4«r.|j7«}    |j9«j;«}d} t=|
«rnªt?j@|
d«r |jtjB«}nttE|«}|dv}     t?jF|tI«| |t>jJuxs.t |
tL«xr|
jNtPjRu¬«\}} | || }no|t>jJur| ,t |
tL«rK|
jNtPjRur/tjT|jVtjX¬ «} |&t=|j«rd} |dvrtjZd} n—|dk(r7t]|«rtj^|«dk\rtjZd} n[|dk(rVtjZd} tjtj`«jb}| je|«}| |d} | ]| D]X}tj|«}|jf|jjfksŒ<ti||«}|j|k(sŒXn|    €| tk|j«sï|    | | jV|    jVk(r| }    n|    jm«}    t |    tjn«sJ‚tjT|    jV|j¬ «}|||    <ddl8m9}m:}m;}m<}t{|j«r|}nt}|j«r|}n|}|||    «}|dk(st |
t4«r||j««}|r(|j||jd|j‚¬«S|rdd lBmC}|||j‚¬!«S|r|dS|S#tt,f$r |dk(r‚|}YŒwxYw)"a»
    Convert argument to a numeric type.
 
    The default return dtype is `float64` or `int64`
    depending on the data supplied. Use the `downcast` parameter
    to obtain other dtypes.
 
    Please note that precision loss may occur if really large numbers
    are passed in. Due to the internal limitations of `ndarray`, if
    numbers smaller than `-9223372036854775808` (np.iinfo(np.int64).min)
    or larger than `18446744073709551615` (np.iinfo(np.uint64).max) are
    passed in, it is very likely they will be converted to float so that
    they can be stored in an `ndarray`. These warnings apply similarly to
    `Series` since it internally leverages `ndarray`.
 
    Parameters
    ----------
    arg : scalar, list, tuple, 1-d array, or Series
        Argument to be converted.
    errors : {'ignore', 'raise', 'coerce'}, default 'raise'
        - If 'raise', then invalid parsing will raise an exception.
        - If 'coerce', then invalid parsing will be set as NaN.
        - If 'ignore', then invalid parsing will return the input.
 
        .. versionchanged:: 2.2
 
        "ignore" is deprecated. Catch exceptions explicitly instead.
 
    downcast : str, default None
        Can be 'integer', 'signed', 'unsigned', or 'float'.
        If not None, and if the data has been successfully cast to a
        numerical dtype (or if the data was numeric to begin with),
        downcast that resulting data to the smallest numerical dtype
        possible according to the following rules:
 
        - 'integer' or 'signed': smallest signed int dtype (min.: np.int8)
        - 'unsigned': smallest unsigned int dtype (min.: np.uint8)
        - 'float': smallest float dtype (min.: np.float32)
 
        As this behaviour is separate from the core conversion to
        numeric values, any errors raised during the downcasting
        will be surfaced regardless of the value of the 'errors' input.
 
        In addition, downcasting will only occur if the size
        of the resulting data's dtype is strictly larger than
        the dtype it is to be cast to, so if none of the dtypes
        checked satisfy that specification, no downcasting will be
        performed on the data.
    dtype_backend : {'numpy_nullable', 'pyarrow'}, default 'numpy_nullable'
        Back-end data type applied to the resultant :class:`DataFrame`
        (still experimental). Behaviour is as follows:
 
        * ``"numpy_nullable"``: returns nullable-dtype-backed :class:`DataFrame`
          (default).
        * ``"pyarrow"``: returns pyarrow-backed nullable :class:`ArrowDtype`
          DataFrame.
 
        .. versionadded:: 2.0
 
    Returns
    -------
    ret
        Numeric if parsing succeeded.
        Return type depends on input.  Series if Series, otherwise ndarray.
 
    See Also
    --------
    DataFrame.astype : Cast argument to a specified dtype.
    to_datetime : Convert argument to datetime.
    to_timedelta : Convert argument to timedelta.
    numpy.ndarray.astype : Cast a numpy array to a specified type.
    DataFrame.convert_dtypes : Convert dtypes.
 
    Examples
    --------
    Take separate series and convert to numeric, coercing when told to
 
    >>> s = pd.Series(['1.0', '2', -3])
    >>> pd.to_numeric(s)
    0    1.0
    1    2.0
    2   -3.0
    dtype: float64
    >>> pd.to_numeric(s, downcast='float')
    0    1.0
    1    2.0
    2   -3.0
    dtype: float32
    >>> pd.to_numeric(s, downcast='signed')
    0    1
    1    2
    2   -3
    dtype: int8
    >>> s = pd.Series(['apple', '1.0', '2', -3])
    >>> pd.to_numeric(s, errors='coerce')
    0    NaN
    1    1.0
    2    2.0
    3   -3.0
    dtype: float64
 
    Downcasting of nullable integer and floating dtypes is supported:
 
    >>> s = pd.Series([1, 2, 3], dtype="Int64")
    >>> pd.to_numeric(s, downcast="integer")
    0    1
    1    2
    2    3
    dtype: Int8
    >>> s = pd.Series([1.0, 2.1, 3.0], dtype="Float64")
    >>> pd.to_numeric(s, downcast="float")
    0    1.0
    1    2.1
    2    3.0
    dtype: Float32
    )NÚintegerÚsignedÚunsignedÚfloatz#invalid downcasting method provided)ÚignorerÚcoercezinvalid error value specifiedr"z‘errors='ignore' is deprecated and will raise in a future version. Use to_numeric without passing `errors` and catch exceptions explicitly instead)Ú
stacklevelFTÚi8ÚO)ÚdtypeÚndiméz/arg must be a list, tuple, 1-d array, or SeriesNr'ÚmM)r"r)Úcoerce_numericÚconvert_to_masked_nullabler)rrÚIntegerr rÚUnsignedIntegerr!ÚFloat)ÚArrowExtensionArrayÚ BooleanArrayÚ FloatingArrayÚ IntegerArrayÚpyarrow)ÚindexÚname)ÚIndex)r6)DÚ
ValueErrorÚwarningsÚwarnÚ FutureWarningrr    Ú
isinstancerÚvaluesrrr'ÚviewÚlistÚtupleÚnpÚarrayrr r!rÚgetattrÚ    TypeErrorrÚ_maskÚ_datarÚisnaÚdropnaÚto_numpyrrÚ is_np_dtypeÚint64r Úmaybe_convert_numericÚsetÚ
no_defaultrÚna_valueÚ
libmissingÚNAÚzerosÚshapeÚbool_Ú    typecodesÚlenÚminÚfloat32Úcharr5Úitemsizer
rÚcopyÚndarrayÚpandas.core.arraysr0r1r2r3rr Ú__arrow_array__Ú _constructorr6Úpandasr7)ÚargÚerrorsÚdowncastÚ dtype_backendÚ    is_seriesÚis_indexÚ
is_scalarsr=Ú orig_valuesÚmaskÚ values_dtypeÚnew_maskr+rUÚ float_32_charÚ float_32_indÚtypecoder'Údatar0r1r2r3Úklassr7s                         úLH:\Change_password\venv_build\Lib\site-packages\pandas/core/tools/numeric.pyÚ
to_numericrr/sÚ€ðtÐGÑGÜÐ>Ó?Ð?à Ð2Ñ2ÜÐ8Ó9Ð9Ø Òä ‰ ð !ô Ü'Ó)õ     
ô˜ Ô&à€IØ€HØ€Jä#”yÔ!؈    Ø—‘‰Ü    CœÔ    "ØˆÜ ˜sŸy™yÔ )Ø—X‘X˜d“^‰Fà—Z‘Z‰FÜ    Cœ$¤˜Ô    'Ü—‘˜# SÔ)‰Ü    3ŒÜ cŒ?ܘ“:Ð Ü SŒ>؈J؈
Ü—‘˜3˜% sÔ+‰Ü    f˜aÓ      1Ò    $ÜÐIÓJÐJàˆà€Kð*.€Dܐ&œ/Ô*؏|‰|ˆØ—‘˜t˜eÑ$ˆä˜6 7¨DÓ1€Lܐ,¤
Ô+؏{‰{‹}ˆØ—‘“×)Ñ)Ó+ˆØ"&€Hܘ Ô%Ø Ü     ‰˜ tÔ    ,Ø—‘œRŸX™XÓ&‰ä˜vÓ&ˆØÐ':Ð:ˆð     !Ü"×8Ñ8ØÜ“Ø-Ø+8ÄÇÁÐ+Nò,;ܘl¬KÓ8ò;Ø ×)Ñ)¬Z¯]©]Ð:ô  Ñ ˆFHðÐ𘘠   Ñ"‰àœSŸ^™^Ñ+Ø Ð Ü l¤KÔ 0Ø × !Ñ !¤Z§]¡]Ñ 2ä—8‘8˜FŸL™L´·±Ô9ˆðÑÔ 0°·±Õ >Ø $ˆ    à Ð,Ñ ,ÜŸ ™  YÑ/‰IØ ˜Ò #¬S°¬[¼B¿F¹FÀ6»NÈaÒ<OÜŸ ™ Ð%6Ñ7‰IØ ˜Ò  ÜŸ ™  WÑ-ˆIô
ŸH™H¤R§Z¡ZÓ0×5Ñ5ˆMØ$Ÿ?™?¨=Ó9ˆLØ! , -Ð0ˆIà Ð  à%ò ÜŸ™ Ó*Ø—>‘> V§\¡\×%:Ñ%:Ó:Ü3°F¸EÓBFð—|‘| uÓ,Ùð ð     ИHÑ0¼/È&Ï,É,Ô:WØ ˆ<˜HÐ0°X·^±^ÀtÇzÁzÒ5Qà‰Dà—9‘9“;ˆDܘ$¤§
¡
Ô+Ð+Ð+܏x‰x˜Ÿ
™
¨&¯,©,Ô7ˆØˆˆdˆU‰ ÷    
ó    
ô ˜DŸJ™JÔ 'Ø ‰EÜ ˜4Ÿ:™:Ô &Ø ‰Eà!ˆEِt˜TÓ"ˆà ˜IÒ %¬°LÄ*Ô)MÙ(¨×)?Ñ)?Ó)AÓBˆFáØ×Ñ ¨c¯i©i¸c¿h¹hÐÓGÐGÙ    õ    !áV #§(¡(Ô+Ð+Ù    Øa‰yÐàˆ øôsœIÐ&ò    !Ø˜Ò ØØ ‹Fð    !úsÈ!A$U>Õ>VÖV)rbrrcz8Literal['integer', 'signed', 'unsigned', 'float'] | NonerdzDtypeBackend | lib.NoDefault)+Ú
__future__rÚtypingrrr9ÚnumpyrAÚ pandas._libsrrrPÚpandas.util._exceptionsrÚpandas.util._validatorsr    Úpandas.core.dtypes.castr
Úpandas.core.dtypes.commonr r r rrrrrrÚpandas.core.dtypes.dtypesrÚpandas.core.dtypes.genericrrr]rÚpandas.core.arrays.string_rÚpandas._typingrrrrNrr©órqú<module>rsˆðÝ"÷óã÷õ5Ý7å:÷
÷
õ
õ1÷õ
/Ý2á÷ñð$+ØIMØ25·.±.ð    ]à  ð]ðGð]ð0ô    ]r€