ó
    Ñ]jk*  ã                  ó6  • S SK Jr  S SKJrJr  S SKrS SKJrJ	r
  S SKJrJr  S SKJr  S SKJr  S SKJr  S S	KJrJrJrJrJrJrJrJrJr  S S
KJr  S SK J!r!J"r"  S SK#J$r$  S SK%J&r&  \(       a
  S SK'J(r(J)r)J*r*  \" S5      SS\RV                  4     SS jj5       r,g)é    )Úannotations)ÚTYPE_CHECKINGÚLiteralN)ÚlibÚmissing)Ú	TimedeltaÚ	Timestamp)Ú
set_module)Ú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ÚpandasÚraisec           	     óü  • US;  a  [        S5      eUS;  a  [        S5      e[        U5        SnSnSn[        U [        5      (       a  SnU R                  nGO[        U [
        5      (       a;  Sn[        U R                  5      (       a  U R                  S5      nOÙU R                  nOÌ[        U [        [        45      (       a  [        R                  " U SS	9nO›[        U 5      (       am  [        U 5      (       a  [        U 5      $ [!        U 5      (       a  U $ [        U ["        [$        45      (       a  U R&                  $ Sn[        R                  " U /SS	9nO[)        U S
S5      S:”  a  [+        S5      eU nSn[        U[,        5      (       a  UR.                  nUR0                  U)    n[)        USS5      n	[        U	[2        5      (       a.  UR5                  5       nUR7                  5       R9                  5       nSn
[;        U	5      (       a  O·[<        R>                  " U	S5      (       a   UR                  [        R@                  5      nO{[C        U5      nUS:g  n[<        RD                  " U[G        5       UU[<        RH                  L=(       d3    [        U	[J        5      =(       a    U	RL                  [N        RP                  L S9u  pzU
b  Xz)    nOuU[<        RH                  La  U
b2  [        U	[J        5      (       aJ  U	RL                  [N        RP                  L a-  [        RR                  " URT                  [        RV                  S	9n
UGb=  [;        UR                  5      (       Ga"  SnUS;   a  [        RX                  S   nO US:X  a>  [[        U5      (       a  [        R\                  " U5      S:¼  a  [        RX                  S   nO\US:X  aV  [        RX                  S   n[        R                  " [        R^                  5      R`                  nURc                  U5      nXÎS nUbc  U H]  n[        R                  " U5      nURd                  UR                  Rd                  ::  d  M?  [g        UU5      nUR                  U:X  d  M]    O   Uc  U
Gb   [i        UR                  5      (       Gd  Ub  U
b  U
RT                  URT                  :X  a  U
nOURk                  5       n[        U[        Rl                  5      (       d   e[        RR                  " URT                  UR                  S	9nUUU) '   SSK7J8nJ9nJ:nJ;n  [y        UR                  5      (       a  UnO[{        UR                  5      (       a  UnOUnU" UU5      nUS:X  d  [        U	[2        5      (       a  U" UR}                  5       5      nU(       a$  U R                  XpRb                  U R€                  S9$ U(       a  SSKAJBn  U" XpR€                  S9$ U(       a  US   $ U$ )aó  
Convert argument to a numeric type.

If the input is already of a numeric dtype, the dtype will be preserved.
For non-numeric inputs, 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 : {'raise', 'coerce'}, default 'raise'
    - If 'raise', then invalid parsing will raise an exception.
    - If 'coerce', then invalid parsing will be set as NaN.

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'}
    Back-end data type applied to the resultant :class:`DataFrame`
    (still experimental). If not specified, the default behavior
    is to not use nullable data types. If specified, the behavior
    is as follows:

    * ``"numpy_nullable"``: returns nullable-dtype-backed object
    * ``"pyarrow"``: returns with pyarrow-backed nullable object

    .. versionadded:: 2.0

Returns
-------
ret
    Numeric if parsing succeeded.
    Return type depends on input.  Series if Series, otherwise ndarray.

Raises
------
ValueError
    If the input contains non-numeric values and `errors='raise'`.
TypeError
    If the input is not list-like, 1D, or scalar convertible to numeric,
    such as nested lists or unsupported input types (e.g., dict).

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)r   Úcoercezinvalid error value specifiedFTÚi8ÚO)ÚdtypeÚndimé   z/arg must be a list, tuple, 1-d array, or SeriesNr(   ÚmMr   )Úcoerce_numericÚconvert_to_masked_nullable)r!   r"   ÚIntegerr#   r   ÚUnsignedIntegerr$   ÚFloat)ÚArrowExtensionArrayÚBooleanArrayÚFloatingArrayÚIntegerArrayÚpyarrow)ÚindexÚname)ÚIndex)r7   )CÚ
ValueErrorr   Ú
isinstancer   Úvaluesr   r   r(   ÚviewÚlistÚtupleÚnpÚarrayr   r   r$   r   r   r	   Ú_valueÚgetattrÚ	TypeErrorr   Ú_maskÚ_datar   ÚisnaÚdropnaÚto_numpyr   r   Úis_np_dtypeÚint64r   Úmaybe_convert_numericÚsetÚ
no_defaultr   Úna_valueÚ
libmissingÚNAÚzerosÚshapeÚbool_Ú	typecodesÚlenÚminÚfloat32Úcharr6   Úitemsizer   r   ÚcopyÚndarrayÚpandas.core.arraysr1   r2   r3   r4   r   r   Ú__arrow_array__Ú_constructorr7   r   r8   )ÚargÚerrorsÚdowncastÚdtype_backendÚ	is_seriesÚis_indexÚ
is_scalarsr;   ÚmaskÚvalues_dtypeÚnew_maskr,   rT   Úfloat_32_charÚfloat_32_indÚtypecoder(   Údatar1   r2   r3   r4   Úklassr8   s                           ÚV/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/core/tools/numeric.pyÚ
to_numericro   2   sÂ  € ðB ÐGÓGÜÐ>Ó?Ð?àÐ(Ó(ÜÐ8Ó9Ð9ä˜Ô&à€IØ€HØ€Jä�#”y×!Ñ!Øˆ	Ø—‘ŠÜ	�Cœ×	"Ñ	"ØˆÜ˜sŸy™y×)Ñ)Ø—X‘X˜d“^‰Fà—Z‘Z‰FÜ	�Cœ$¤˜×	'Ñ	'Ü—’˜# SÑ)‰Ü	�3�‰Ü�c�?‰?Ü˜“:ÐÜ�S�>‰>ØˆJÜ�cœI¤yÐ1×2Ñ2Ø—:‘:ÐØˆ
Ü—’˜3˜% sÑ+‰Ü	��f˜aÓ	  1Ó	$ÜÐIÓJÐJàˆð *.€DÜ�&œ/×*Ñ*Ø�|‰|ˆØ—‘˜t˜eÑ$ˆä˜6 7¨DÓ1€LÜ�,¤
×+Ñ+Ø�{‰{‹}ˆØ—‘“×)Ñ)Ó+ˆØ"&€HÜ˜×%Ñ%ØÜ	�Š˜ t×	,Ñ	,Ø—‘œRŸX™XÓ&‰ä˜vÓ&ˆØ 7Ñ*ˆÜ×4Ò4ØÜ‹EØ)Ø'4¼C¿N¹NÐ'J÷ (ä˜<¬Ó5÷ ;Ø ×)Ñ)¬Z¯]©]Ð:ñ	
Ñˆð Ñð ˜	Ñ"‰Ø
œsŸ~™~Ò
-°(Ñ2BÜ�<¤×-Ñ-°,×2GÑ2GÌ:Ï=É=Ò2Xä—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Ò: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Ñ)MÙ(¨×)?Ñ)?Ó)AÓBˆFæØ×Ñ ¯i©i¸c¿h¹hÐÐGÐGÞ	õ 	!á�V§(¡(Ñ+Ð+Þ	Ø�a‰yÐàˆó    )r`   r   ra   z8Literal['integer', 'signed', 'unsigned', 'float'] | Nonerb   zDtypeBackend | lib.NoDefault)-Ú
__future__r   Útypingr   r   Únumpyr?   Úpandas._libsr   r   rO   Úpandas._libs.tslibsr   r	   Úpandas.util._decoratorsr
   Úpandas.util._validatorsr   Úpandas.core.dtypes.castr   Úpandas.core.dtypes.commonr   r   r   r   r   r   r   r   r   Úpandas.core.dtypes.dtypesr   Úpandas.core.dtypes.genericr   r   r\   r   Úpandas.core.arrays.string_r   Úpandas._typingr   r   r   rM   ro   © rp   rn   Ú<module>r      sŸ   ðÝ "÷ó
 ÷÷õ /Ý 7å :÷
÷ 
õ 
õ 1÷õ
 /Ý 2æ÷ñ ñ ˆHÓð $+ØIMØ25·.±.ð	Tà ðTð GðTð 0ô	Tó ñTrp   