Ë
    u™ãj6.  ã                  ó(  — d dl mZ d dlmZmZ d dlZd dlmZm	Z
 d dlmZmZ d dlmZ d dlmZ d dlmZ d d	lmZmZmZmZmZmZmZmZmZ d d
lmZ d dl m!Z!m"Z" d dl#m$Z$ d dl%m&Z& er
d dl'm(Z(m)Z)m*Z*  ed«      ddejV                  f	 	 	 	 	 dd„«       Z,y)é    )Ú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           	     ó8  — |dvrt        d«      ‚|dvrt        d«      ‚t        |«       d}d}d}t        | t        «      r6d}| j                  }t        | j                  «      �r|j                  d«      }nüt        | t        «      r6d}t        | j                  «      r| j                  d«      }nÃ| j                  }n¶t        | t        t        f«      rt        j                  | d¬	«      }nˆt        | «      r`t        | «      rt!        | «      S t#        | «      r| S t        | t$        t&        f«      r| j(                  S d}t        j                  | gd¬	«      }nt+        | d
d«      dkD  rt-        d«      ‚| }d}t        |t.        «      r|j0                  }|j2                  |    }t+        |dd«      }	t        |	t4        «      r.|j7                  «       }|j9                  «       j;                  «       }d}
t=        |	«      rnªt?        j@                  |	d«      r |j                  t        jB                  «      }nttE        |«      }|dk7  }t?        jF                  |tI        «       ||t>        jJ                  uxs. t        |	tL        «      xr |	jN                  tP        jR                  u ¬«      \  }}
|
�||
    }no|t>        jJ                  ur|
�,t        |	tL        «      rK|	jN                  tP        jR                  u r/t        jT                  |jV                  t        jX                  ¬	«      }
|��&t=        |j                  «      �rd}|dv rt        jZ                  d   }n—|dk(  r7t]        |«      rt        j^                  |«      dk\  rt        jZ                  d   }n[|dk(  rVt        jZ                  d   }t        j                  t        j`                  «      jb                  }|je                  |«      }||d }|�]|D ]X  }t        j                  |«      }|jf                  |j                  jf                  k  sŒ<ti        ||«      }|j                  |k(  sŒX n |€|
��tk        |j                  «      sï|�|
�|
jV                  |jV                  k(  r|
}n|jm                  «       }t        |t        jn                  «      sJ ‚t        jT                  |jV                  |j                  ¬	«      }||| <   ddl8m9}m:}m;}m<} t{        |j                  «      r|}nt}        |j                  «      r|}n|} |||«      }|dk(  st        |	t4        «      r ||j                  «       «      }|r(| j�                  || jd                  | j‚                  ¬«      S |rddlBmC}  ||| j‚                  ¬«      S |r|d   S |S )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, Index, 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 result
        (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
    -------
    scalar, Series, Index, numpy.ndarray, or ExtensionArray
        Numeric scalars are returned unchanged. Other scalars are returned
        as a NumPy scalar: ``np.int64`` if possible (``np.uint64`` for
        positive values above the ``int64`` maximum), otherwise ``np.float64``,
        before any ``downcast`` is applied. With ``dtype_backend="pyarrow"``,
        a Python scalar is returned instead.
        For 1-d: :class:`Series` if Series, :class:`Index` if Index,
        otherwise an array as specified by ``dtype_backend``.

        If ``errors='coerce'``, un-parseable values become ``NaN``
        (or ``pd.NA`` if ``dtype_backend`` is not the default).
        If ``errors='raise'`` (default),
        a :exc:`ValueError` is raised for invalid values.

    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

    Scalar input returns a scalar:

    >>> pd.to_numeric("42")
    np.int64(42)
    >>> pd.to_numeric("3.14")
    np.float64(3.14)

    Index input returns an Index:

    >>> pd.to_numeric(pd.Index(["1", "2", "3"]))
    Index([1, 2, 3], dtype='int64')
    )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   )DÚ
ValueErrorr   Ú
isinstancer   Ú_valuesr   r(   Úviewr   ÚvaluesÚ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,   rU   Úfloat_32_charÚfloat_32_indÚtypecoder(   Údatar1   r2   r3   r4   Úklassr8   s                           úd/var/www/html/python-recuperauto-other/env/lib/python3.12/site-packages/pandas/core/tools/numeric.pyÚ
to_numericrp   2   s³  € ðn ÐGÑGÜÐ>Ó?Ð?àÐ(Ñ(ÜÐ8Ó9Ð9ä˜Ô&à€IØ€HØ€Jä�#”yÔ!Øˆ	Ø—‘ˆÜ˜sŸy™yÕ)Ø—[‘[ Ó&‰FÜ	�CœÔ	"ØˆÜ˜sŸy™yÔ)Ø—X‘X˜d“^‰Fà—Z‘Z‰FÜ	�Cœ$¤˜Ô	'Ü—‘˜# SÔ)‰Ü	�3ŒÜ�cŒ?Ü˜“:ÐÜ�SŒ>ØˆJÜ�cœI¤yÐ1Ô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Øˆ<˜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Ðàˆó    )ra   r   rb   z8Literal['integer', 'signed', 'unsigned', 'float'] | Nonerc   zDtypeBackend | lib.NoDefault)-Ú
__future__r   Útypingr   r   Únumpyr@   Úpandas._libsr   r   rP   Ú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   rN   rp   © rq   ro   ú<module>r€      sŸ   ðÝ "÷ó
 ÷÷õ /Ý 7å :÷
÷ 
õ 
õ 1÷õ
 /Ý 2á÷ñ ñ ˆHÓð $+ØIMØ25·.±.ð	là ðlð Gðlð 0ò	ló ñlrq   