§
    tŠtj^F  ã                  óZ  — d Z ddlmZ ddlZddlmZmZ ddlmZm	Z	m
Z
mZmZmZ ddlZddlmZ ddlZddlZddlmZmZmZmZmZmZ ddlZddlmZ dd	lmZ dd
l m!Z!m"Z" ddl#m$Z$m%Z%m&Z&m'Z'm(Z( ddl)m*Z* ddl+m,Z, erddl-m.Z.m/Z/m0Z0m1Z1m2Z2m3Z3 ddl4m5Z5 d„ Z6d„ Z7dtd„Z8d„ Z9d„ Z:dud„Z;dud„Z<dud„Z=dud„Z>dvd„Z?e	 dwdxd%„¦   «         Z@edwdyd(„¦   «         Z@dzdyd)„Z@	 dzd{d,„ZAd-„ ZBd|d1„ZCdud2„ZDdud3„ZEd}d7„ZFd~d8„ZGd9„ ZHd:„ ZId;„ ZJedd>„¦   «         ZKed€dA„¦   «         ZKdzd�dC„ZK edD¦  «        ZLed‚dL„¦   «         ZMedƒdN„¦   «         ZMd„dP„ZMdQ„ ZNd…dT„ZOejP        d†d‡dZ„¦   «         ZQdˆd^„ZRi ejS        d_“ejT        d`“ejU        da“ejV        db“ejW        dc“ejS        d_“ejX        d_“ejY        dd“ejZ        dd“ej[        de“ej\        de“ej]        df“ej^        df“ej_        dg“ej`        dg“eja        dh“ejb        dh“ejT        d`ejc        d`ejU        daejd        daeje        diejf        diejg        djejh        dji¥Zid‰dn„ZjdŠdr„Zkds„ ZldS )‹zh
Misc tools for implementing data structures

Note: pandas.core.common is *not* part of the public API.
é    )ÚannotationsN)ÚabcÚdefaultdict)ÚCallableÚ
CollectionÚ	GeneratorÚHashableÚIterableÚSequence)Úpartial)ÚTYPE_CHECKINGÚAnyÚConcatenateÚTypeVarÚcastÚoverload)Úlib)Ú'construct_1d_object_array_from_listlike)Úis_bool_dtypeÚ
is_integer)ÚABCExtensionArrayÚABCIndexÚABCMultiIndexÚABCNumpyExtensionArrayÚ	ABCSeries)Úiterable_not_string)Ú
Expression)ÚAnyArrayLikeÚ	ArrayLikeÚNpDtypeÚPÚRandomStateÚT)ÚIndexc              #  óf   K  — | D ]+}t          |¦  «        rt          |¦  «        E d{V —† Œ'|V — Œ,dS )a  
    Flatten an arbitrarily nested sequence.

    Parameters
    ----------
    line : sequence
        The non string sequence to flatten

    Notes
    -----
    This doesn't consider strings sequences.

    Returns
    -------
    flattened : generator
    N)r   Úflatten)ÚlineÚelements     úP/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/core/common.pyr&   r&   D   s_   è è € ð" ð ð ˆÝ˜wÑ'Ô'ð 	Ý˜wÑ'Ô'Ð'Ð'Ð'Ð'Ð'Ð'Ð'Ð'àˆMˆMˆMˆMð	ð ó    c                ó€   — | d         j         }| dd …         D ]%}	 |j         |k    rd } nŒ# t          $ r d }Y  nw xY w|S )Nr   é   )ÚnameÚ
ValueError)Úobjsr-   Úobjs      r)   Úconsensus_name_attrr1   \   su   € Ø�Œ7Œ<€DØ�A�B�BŒxð ð ˆð	ØŒx˜4ÒÐØ�Ø�ð  øõ ð 	ð 	ð 	ØˆDØˆEˆEð	øøøð €Ks   ›+«;º;Úkeyr   ÚreturnÚboolc                óV  — t          | t          t          j        t          t
          t          f¦  «        r”t          | t          ¦  «        s| j        t          j	        k    rSt          j
        | ¦  «        }t          j        |¦  «        s)d}t          j        |d¬¦  «        rt          |¦  «        ‚dS dS t          | j        ¦  «        rdS nat          | t          ¦  «        rLt!          | ¦  «        dk    r9t#          | ¦  «        t          urt          | ¦  «        } t          j        | ¦  «        S dS )aË  
    Check whether `key` is a valid boolean indexer.

    Parameters
    ----------
    key : Any
        Only list-likes may be considered boolean indexers.
        All other types are not considered a boolean indexer.
        For array-like input, boolean ndarrays or ExtensionArrays
        with ``_is_boolean`` set are considered boolean indexers.

    Returns
    -------
    bool
        Whether `key` is a valid boolean indexer.

    Raises
    ------
    ValueError
        When the array is an object-dtype ndarray or ExtensionArray
        and contains missing values.

    See Also
    --------
    check_array_indexer : Check that `key` is a valid array to index,
        and convert to an ndarray.
    z=Cannot mask with non-boolean array containing NA / NaN valuesT)ÚskipnaFr   )Ú
isinstancer   ÚnpÚndarrayr   r   r   r   ÚdtypeÚobject_Úasarrayr   Úis_bool_arrayr.   r   ÚlistÚlenÚtypeÚis_bool_list)r2   Ú	key_arrayÚna_msgs      r)   Úis_bool_indexerrD   i   s  € õ8 ØÝ	•B”J¥Õ*;Õ=SÐTñô ð )õ ˜�mÑ,Ô,ð)ð Œ9�œ
Ò"Ð"Ýœ
 3™œˆIåÔ$ YÑ/Ô/ð ØX�ÝÔ$ Y°tÐ<Ñ<Ô<ð -õ % VÑ,Ô,Ð,Ø�uØ�4Ý˜3œ9Ñ%Ô%ð 	Ø�4ð	å	�C�Ñ	Ô	ð )åˆs‰8Œ8�aŠ<ˆ<Ý�C‰yŒy¥Ð$Ð$å˜3‘i”i�ÝÔ# CÑ(Ô(Ð(àˆ5r*   c                ót   — t          j        | ¦  «        r#|                      ¦   «         rt          d¦  «        ‚| S )z®
    Disallow indexing with a float key, even if that key is a round number.

    Parameters
    ----------
    val : scalar

    Returns
    -------
    outval : scalar
    zYIndexing with a float is no longer supported. Manually convert to an integer key instead.)r   Úis_floatr   Ú
IndexError)Úvals    r)   Úcast_scalar_indexerrI   ¡   sE   € õ „|�CÑÔð 
˜SŸ^š^Ñ-Ô-ð 
Ýð)ñ
ô 
ð 	
ð
 €Jr*   c                 ó   — d„ | D ¦   «         S )zL
    Returns a generator consisting of the arguments that are not None.
    c              3  ó   K  — | ]}|®|V — Œ	d S ©N© ©Ú.0Úargs     r)   ú	<genexpr>znot_none.<locals>.<genexpr>»   s"   è è € Ð3Ð3�C 3 ?ˆC ? ? ? ?Ð3Ð3r*   rM   ©Úargss    r)   Únot_nonerT   ·   s   € ð 4Ð3˜4Ð3Ñ3Ô3Ð3r*   c                 ó4   — t          d„ | D ¦   «         ¦  «        S )z?
    Returns a boolean indicating if any argument is None.
    c              3  ó   K  — | ]}|d u V — Œ	d S rL   rM   rN   s     r)   rQ   zany_none.<locals>.<genexpr>Â   ó&   è è € Ð+Ð+˜sˆs�dˆ{Ð+Ð+Ð+Ð+Ð+Ð+r*   ©ÚanyrR   s    r)   Úany_nonerZ   ¾   ó!   € õ Ð+Ð+ dÐ+Ñ+Ô+Ñ+Ô+Ð+r*   c                 ó4   — t          d„ | D ¦   «         ¦  «        S )zA
    Returns a boolean indicating if all arguments are None.
    c              3  ó   K  — | ]}|d u V — Œ	d S rL   rM   rN   s     r)   rQ   zall_none.<locals>.<genexpr>É   rW   r*   ©ÚallrR   s    r)   Úall_noner`   Å   r[   r*   c                 ó4   — t          d„ | D ¦   «         ¦  «        S )zC
    Returns a boolean indicating if any argument is not None.
    c              3  ó   K  — | ]}|d uV — Œ	d S rL   rM   rN   s     r)   rQ   zany_not_none.<locals>.<genexpr>Ð   ó&   è è € Ð/Ð/ 3ˆs˜$ˆÐ/Ð/Ð/Ð/Ð/Ð/r*   rX   rR   s    r)   Úany_not_nonerd   Ì   ó!   € õ Ð/Ð/¨$Ð/Ñ/Ô/Ñ/Ô/Ð/r*   c                 ó4   — t          d„ | D ¦   «         ¦  «        S )zE
    Returns a boolean indicating if all arguments are not None.
    c              3  ó   K  — | ]}|d uV — Œ	d S rL   rM   rN   s     r)   rQ   zall_not_none.<locals>.<genexpr>×   rc   r*   r^   rR   s    r)   Úall_not_nonerh   Ó   re   r*   Úintc                 ó4   — t          d„ | D ¦   «         ¦  «        S )z;
    Returns the count of arguments that are not None.
    c              3  ó   K  — | ]}|d uV — Œ	d S rL   rM   ©rO   Úxs     r)   rQ   z!count_not_none.<locals>.<genexpr>Þ   s&   è è € Ð+Ð+ ˆq˜ˆ}Ð+Ð+Ð+Ð+Ð+Ð+r*   )ÚsumrR   s    r)   Úcount_not_nonero   Ú   r[   r*   .ÚvaluesúArrayLike | list | tuple | zipr:   úNpDtype | Noneú
np.ndarrayc                ó   — d S rL   rM   ©rp   r:   s     r)   Úasarray_tuplesaferv   á   s	   € ð €Cr*   r
   r   c                ó   — d S rL   rM   ru   s     r)   rv   rv   ë   s   € ØSVÐSVr*   c                óŽ  — t          | t          t          f¦  «        s t          | d¦  «        st          | ¦  «        } n8t          | t          ¦  «        r| j        S t          | t          ¦  «        r| j        S t          | t          ¦  «        r$|t          j        t          fv rt          | ¦  «        S 	 t          j        | |¬¦  «        }n# t          $ r t          | ¦  «        cY S w xY wt          |j        j        t           ¦  «        rt          j        | t          ¬¦  «        }|j        dk    rd„ | D ¦   «         } t          | ¦  «        }|S )NÚ	__array__©r:   é   c                ó,   — g | ]}t          |¦  «        ‘ŒS rM   )Útuplerl   s     r)   ú
<listcomp>z%asarray_tuplesafe.<locals>.<listcomp>  s   € Ð+Ð+Ð+˜q•%˜‘(”(Ð+Ð+Ð+r*   )r7   r>   r}   Úhasattrr   Ú_valuesr   r8   r;   Úobjectr   r<   r.   Ú
issubclassr:   r@   ÚstrÚndim)rp   r:   Úresults      r)   rv   rv   ï   sF  € Ý�v¥¥e˜}Ñ-Ô-ð µ¸ÀÑ1MÔ1Mð Ý�f‘”ˆˆÝ	�F�HÑ	%Ô	%ð ØŒ~ÐÝ	�F�IÑ	&Ô	&ð ØŒ~Ðå�&�$ÑÔð ? E­b¬j½&Ð-AÐ$AÐ$AÝ6°vÑ>Ô>Ð>ð?Ý”˜F¨%Ð0Ñ0Ô0ˆˆøÝð ?ð ?ð ?õ
 7°vÑ>Ô>Ð>Ð>Ð>ð?øøøõ �&”,Ô#¥SÑ)Ô)ð 2Ý”˜F­&Ð1Ñ1Ô1ˆà„{�aÒÐà+Ð+ FÐ+Ñ+Ô+ˆÝ8¸Ñ@Ô@ˆà€Ms   Â/C ÃC"Ã!C"Úlabelsúnp.ndarray | Iterablec                óð   — t          | t          t          f¦  «        r| g} t          | t          t          j        f¦  «        s$	 t          | ¦  «        } n# t          $ r | g} Y nw xY wt          | |¬¦  «        }|S )zë
    Transform label or iterable of labels to array, for use in Index.

    Parameters
    ----------
    dtype : dtype
        If specified, use as dtype of the resulting array, otherwise infer.

    Returns
    -------
    array
    rz   )r7   rƒ   r}   r>   r8   r9   Ú	TypeErrorrv   )r†   r:   Úrlabelss      r)   Úindex_labels_to_arrayr‹     s‹   € õ �&�3¥˜,Ñ'Ô'ð Ø�ˆå�f�t¥R¤ZÐ0Ñ1Ô1ð ð	Ý˜&‘\”\ˆFˆFøÝð 	ð 	ð 	Ø�XˆFˆFˆFð	øøøõ   ¨eÐ4Ñ4Ô4€Gà€Ns   ÁA ÁA"Á!A"c                óH   — | �t          | t          t          f¦  «        s| gS | S rL   )r7   r}   r>   ©r0   s    r)   Úmaybe_make_listrŽ   +  s%   € Ø
€�z¨#µµt¨}Ñ=Ô=€ØˆuˆØ€Jr*   r0   úIterable[T] | TúCollection[T] | Tc                ó¶   — t          | t          j        ¦  «        r)t          | t          j        ¦  «        st	          | ¦  «        S t          t          | ¦  «        } | S )zB
    If obj is Iterable but not list-like, consume into list.
    )r7   r   r
   ÚSizedr>   r   r   r�   s    r)   Úmaybe_iterable_to_listr“   1  sK   € õ �#•s”|Ñ$Ô$ð ­Z¸½S¼YÑ-GÔ-Gð Ý�C‰yŒyÐÝ
�z˜3Ñ
Ô
€CØ€Jr*   c                ób   — t          | t          ¦  «        o| j        du o| j        du o| j        du S )z
    We have a null slice.
    N©r7   ÚsliceÚstartÚstopÚstepr�   s    r)   Úis_null_slicerš   ;  sE   € õ
 	�3�ÑÔð 	ØŒI˜Ðð	àŒH˜Ðð	ð ŒH˜Ðð	r*   c                óp   — t          | t          ¦  «        o!| j        duo| j        duo| j        | j        k    S )z>
    We have an empty slice, e.g. no values are selected.
    N)r7   r–   r—   r˜   r�   s    r)   Úis_empty_slicerœ   G  sG   € õ
 	�3�ÑÔð 	"ØŒI˜TÐ!ð	"àŒH˜DÐ ð	"ð ŒI˜œÒ!ð	r*   r'   úabc.Iterableúabc.Generator[bool, None, None]c              #  ób   K  — | D ])}t          |t          ¦  «        ot          |¦  «         V — Œ*dS )z;
    Find non-trivial slices in "line": yields a bool.
    N)r7   r–   rš   )r'   Úks     r)   Úis_true_slicesr¡   S  sJ   è è € ð ð <ð <ˆÝ˜�EÑ"Ô"Ð;­=¸Ñ+;Ô+;Ð';Ð;Ð;Ð;Ð;ð<ð <r*   c                ój   — t          | t          ¦  «        o| j        dk    o| j        |k    o| j        du S )z&
    We have a full length slice.
    r   Nr•   )r0   r'   s     r)   Úis_full_slicer£   \  sD   € õ
 	�3�ÑÔð 	ØŒI˜ŠNð	àŒH˜Òð	ð ŒH˜Ðð	r*   c                óÌ   — t          | d¦  «        r| j        S t          | t          ¦  «        rt	          | j        ¦  «        S t          | ¦  «        rt          | ¦  «        j        S d S )NÚ__name__)r   r¥   r7   r   Úget_callable_nameÚfuncÚcallabler@   r�   s    r)   r¦   r¦   h  sb   € åˆs�JÑÔð ØŒ|Ðå�#•wÑÔð +Ý  ¤Ñ*Ô*Ð*å��}„}ð "Ý�C‰yŒyÔ!Ð!ð
 ˆ4r*   c                ó|   — t          | t          ¦  «        r | j        |fi |¤ŽS t          | ¦  «        r	 | |fi |¤ŽS | S )zØ
    Evaluate possibly callable input using obj and kwargs if it is callable,
    otherwise return as it is.

    Parameters
    ----------
    maybe_callable : possibly a callable
    obj : NDFrame
    **kwargs
    )r7   r   Ú_eval_expressionr¨   )Úmaybe_callabler0   Úkwargss      r)   Úapply_if_callabler­   y  s_   € õ �.¥*Ñ-Ô-ð -Ø.ˆ~Ô.¨sÐ=Ð=°fÐ=Ð=Ð=Ý	�.Ñ	!Ô	!ð -Øˆ~˜cÐ,Ð, VÐ,Ð,Ð,àÐr*   c                ó6  — t          j        | ¦  «        s>t          | t          ¦  «        rt	          t          | j        ¦  «        S t          | ¦  «        } t          | t          j	        ¦  «        st          d| › �¦  «        ‚| t          k    rt          d¦  «        ‚| S )a  
    Helper function to standardize a supplied mapping.

    Parameters
    ----------
    into : instance or subclass of collections.abc.Mapping
        Must be a class, an initialized collections.defaultdict,
        or an instance of a collections.abc.Mapping subclass.

    Returns
    -------
    mapping : a collections.abc.Mapping subclass or other constructor
        a callable object that can accept an iterator to create
        the desired Mapping.

    See Also
    --------
    DataFrame.to_dict
    Series.to_dict
    zunsupported type: z/to_dict() only accepts initialized defaultdicts)ÚinspectÚisclassr7   r   r   Údefault_factoryr@   r‚   r   ÚMappingr‰   )Úintos    r)   Ústandardize_mappingr´   Œ  s�   € õ* Œ?˜4Ñ Ô ð Ý�d�KÑ(Ô(ð 	>Ý�;¨Ô(<Ñ=Ô=Ð=Ý�D‰zŒzˆÝ�d�CœKÑ(Ô(ð 5ÝÐ3¨TÐ3Ð3Ñ4Ô4Ð4Ø�{ÒÐÝÐIÑJÔJÐJØ€Kr*   Ústateúnp.random.Generatorc                ó   — d S rL   rM   ©rµ   s    r)   Úrandom_stater¹   ¬  s   € ØEHÀSr*   úHint | np.ndarray | np.random.BitGenerator | np.random.RandomState | Noneúnp.random.RandomStatec                ó   — d S rL   rM   r¸   s    r)   r¹   r¹   °  s	   € ð  ˜Cr*   úRandomState | Nonec                ór  — t          | ¦  «        s+t          | t          j        t          j        j        f¦  «        rt          j                             | ¦  «        S t          | t          j        j        ¦  «        r| S t          | t          j        j        ¦  «        r| S | €t          j        S t          d¦  «        ‚)aq  
    Helper function for processing random_state arguments.

    Parameters
    ----------
    state : int, array-like, BitGenerator, Generator, np.random.RandomState, None.
        If receives an int, array-like, or BitGenerator, passes to
        np.random.RandomState() as seed.
        If receives an np.random RandomState or Generator, just returns that unchanged.
        If receives `None`, returns np.random.
        If receives anything else, raises an informative ValueError.

        Default None.

    Returns
    -------
    np.random.RandomState or np.random.Generator. If state is None, returns np.random

    Nzdrandom_state must be an integer, array-like, a BitGenerator, Generator, a numpy RandomState, or None)	r   r7   r8   r9   ÚrandomÚBitGeneratorr"   r   r.   r¸   s    r)   r¹   r¹   ¶  s£   € õ( �%ÑÔð 
�J u­r¬z½2¼9Ô;QÐ.RÑSÔSð 
ÝŒy×$Ò$ UÑ+Ô+Ð+Ý	�E�2œ9Ô0Ñ	1Ô	1ð 

ØˆÝ	�E�2œ9Ô.Ñ	/Ô	/ð 
ØˆØ	ˆÝŒyÐåð+ñ
ô 
ð 	
r*   Ú_Tr§   úCallable[Concatenate[_T, P], T]rS   úP.argsr¬   úP.kwargsr#   c                ó   — d S rL   rM   ©r0   r§   rS   r¬   s       r)   ÚpiperÇ   Ü  ó	   € ð 	ˆr*   útuple[Callable[..., T], str]c                ó   — d S rL   rM   rÆ   s       r)   rÇ   rÇ   å  rÈ   r*   ú>Callable[Concatenate[_T, P], T] | tuple[Callable[..., T], str]c                ó˜   — t          |t          ¦  «        r*|\  }}||v r|› d�}t          |¦  «        ‚| ||<    ||i |¤ŽS  || g|¢R i |¤ŽS )as  
    Apply a function ``func`` to object ``obj`` either by passing obj as the
    first argument to the function or, in the case that the func is a tuple,
    interpret the first element of the tuple as a function and pass the obj to
    that function as a keyword argument whose key is the value of the second
    element of the tuple.

    Parameters
    ----------
    func : callable or tuple of (callable, str)
        Function to apply to this object or, alternatively, a
        ``(callable, data_keyword)`` tuple where ``data_keyword`` is a
        string indicating the keyword of ``callable`` that expects the
        object.
    *args : iterable, optional
        Positional arguments passed into ``func``.
    **kwargs : dict, optional
        A dictionary of keyword arguments passed into ``func``.

    Returns
    -------
    object : the return type of ``func``.
    z/ is both the pipe target and a keyword argument)r7   r}   r.   )r0   r§   rS   r¬   Úfunc_ÚtargetÚmsgs          r)   rÇ   rÇ   î  s‚   € õ: �$�ÑÔð 	*à‰ˆˆvØ�VÐÐØÐLÐLÐLˆCÝ˜S‘/”/Ð!Øˆˆv‰Øˆu�dÐ%˜fÐ%Ð%Ð%àˆt�CÐ)˜$Ð)Ð)Ð) &Ð)Ð)Ð)r*   c                óX   ‡ — ˆ fd„}t          ‰ t          j        t          f¦  «        r|n‰ S )zv
    Returns a function that will map names/labels, dependent if mapper
    is a dict, Series or just a function.
    c                ó    •— | ‰v r‰|          S | S rL   rM   )rm   Úmappers    €r)   Úfzget_rename_function.<locals>.f  s   ø€ Ø�ˆ;ˆ;Ø˜!”9ÐàˆHr*   )r7   r   r²   r   )rÒ   rÓ   s   ` r)   Úget_rename_functionrÔ     s>   ø€ ðð ð ð ð õ ˜6¥C¤KµÐ#;Ñ<Ô<ÐHˆ1ˆ1À&ÐHr*   ú"Hashable | Iterable | AnyArrayLikeúlist | AnyArrayLikec                óî   — t          | t          t          j        t          t
          t          f¦  «        r| S t          | t          j        ¦  «        r$t          | t          ¦  «        st          | ¦  «        S | gS )z¤
    Convert list-like or scalar input to list-like. List, numpy and pandas array-like
    inputs are returned unmodified whereas others are converted to list.
    )
r7   r>   r8   r9   r   r   r   r   r
   rƒ   )rp   s    r)   Úconvert_to_list_likerØ   &  sa   € õ �&�4¥¤­XµyÕBSÐTÑUÔUð ØˆÝ	�F�CœLÑ	)Ô	)ð µ*¸VÅSÑ2IÔ2Ið Ý�F‰|Œ|Ðàˆ8€Or*   TÚattrrƒ   Ú	conditionúGenerator[None]c              #  ó¶   K  — |r!t          | |¦  «        }t          | ||¦  «         	 | V — |rt          | ||¦  «         dS dS # |rt          | ||¦  «         w w xY w)aØ  
    Temporarily set attribute on an object.

    Parameters
    ----------
    obj : object
        Object whose attribute will be modified.
    attr : str
        Attribute to modify.
    value : Any
        Value to temporarily set attribute to.
    condition : bool, default True
        Whether to set the attribute. Provided in order to not have to
        conditionally use this context manager.

    Yields
    ------
    object : obj with modified attribute.
    N)ÚgetattrÚsetattr)r0   rÙ   ÚvaluerÚ   Ú	old_values        r)   Útemp_setattrrá   5  sŽ   è è € ð* ð "Ý˜C Ñ&Ô&ˆ	Ý��T˜5Ñ!Ô!Ð!ð*Øˆ	ˆ	ˆ	àð 	*Ý�C˜˜yÑ)Ô)Ð)Ð)Ð)ð	*ð 	*øˆ9ð 	*Ý�C˜˜yÑ)Ô)Ð)Ð)ð	*øøøs   §A ÁAÚindexr$   ÚNonec                ó¦   — t          | ¦  «        t          |¦  «        k    r0t          dt          | ¦  «        › dt          |¦  «        › d�¦  «        ‚dS )zC
    Check the length of data matches the length of the index.
    zLength of values (z") does not match length of index (ú)N)r?   r.   )Údatarâ   s     r)   Úrequire_length_matchrç   T  sg   € õ ˆ4�y„y•C˜‘J”JÒÐÝðÝ�D‘	”	ðð õ �E‘
”
ðð ð ñ
ô 
ð 	
ð Ðr*   rn   ÚmaxÚminr_   rY   ÚmeanÚprodÚstdÚvarÚmedianÚcumprodÚcumsumrP   r   ú
str | Nonec                ó6   — t                                | ¦  «        S )zH
    if we define an internal function for this argument, return it
    )Ú_cython_tableÚget)rP   s    r)   Úget_cython_funcrõ   ~  s   € õ ×Ò˜SÑ!Ô!Ð!r*   ÚnamesúSequence[Hashable | None]úlist[Hashable]c                ó4   — d„ t          | ¦  «        D ¦   «         S )a  
    If a name is missing then replace it by level_n, where n is the count

    Parameters
    ----------
    names : list-like
        list of column names or None values.

    Returns
    -------
    list
        list of column names with the None values replaced.
    c                ó&   — g | ]\  }}|€d|› �n|‘ŒS )NÚlevel_rM   )rO   Úir-   s      r)   r~   z&fill_missing_names.<locals>.<listcomp>“  s*   € ÐSÐSÐS±w°q¸$˜D˜LˆL�QˆLˆLˆL¨dÐSÐSÐSr*   )Ú	enumerate)rö   s    r)   Úfill_missing_namesrþ   …  s!   € ð TÐSÅ)ÈEÑBRÔBRÐSÑSÔSÐSr*   c                ót   — t          j        d¦  «        }|j                             ¦   «         D ]	}|| u r dS Œ
dS )a…  
    Helper function used in detecting chained assignment.

    If the pandas object (DataFrame/Series) is a local variable
    in the caller's frame, it should not be a case of chained
    assignment or method call.

    For example:

    def test():
        df = pd.DataFrame(...)
        df["a"] = 1  # not chained assignment

    Inside ``df.__setitem__``, we call this function to check whether `df`
    (`self`) is a local variable in `test` frame (the frame calling setitem). If
    so, we know it is not a case of chained assignment (even when the refcount
    of `df` is below the threshold due to optimization of local variables).
    r{   TF)ÚsysÚ	_getframeÚf_localsrp   )r0   ÚframeÚvs      r)   Úis_local_in_caller_framer  –  sJ   € õ& ŒM˜!ÑÔ€EØŒ^×"Ò"Ñ$Ô$ð ð ˆØ�ˆ8ˆ8Ø�4�4ð àˆ5r*   )r2   r   r3   r4   )r3   r4   )r3   ri   ).)rp   rq   r:   rr   r3   rs   )rp   r
   r:   rr   r3   r   rL   )r†   r‡   r:   rr   r3   rs   )r0   r�   r3   r�   )r'   r�   r3   rž   )r'   ri   r3   r4   )rµ   r¶   r3   r¶   )rµ   rº   r3   r»   )rµ   r½   )
r0   rÁ   r§   rÂ   rS   rÃ   r¬   rÄ   r3   r#   )
r0   r   r§   rÉ   rS   r   r¬   r   r3   r#   )
r0   rÁ   r§   rË   rS   r   r¬   r   r3   r#   )rp   rÕ   r3   rÖ   )T)rÙ   rƒ   rÚ   r4   r3   rÛ   )râ   r$   r3   rã   )rP   r   r3   rñ   )rö   r÷   r3   rø   )mÚ__doc__Ú
__future__r   ÚbuiltinsÚcollectionsr   r   Úcollections.abcr   r   r   r	   r
   r   Ú
contextlibÚ	functoolsr   r¯   r   Útypingr   r   r   r   r   r   Únumpyr8   Úpandas._libsr   Úpandas.core.dtypes.castr   Úpandas.core.dtypes.commonr   r   Úpandas.core.dtypes.genericr   r   r   r   r   Úpandas.core.dtypes.inferencer   Úpandas.core.colr   Úpandas._typingr   r   r    r!   r"   r#   Úpandasr$   r&   r1   rD   rI   rT   rZ   r`   rd   rh   ro   rv   r‹   rŽ   r“   rš   rœ   r¡   r£   r¦   r­   r´   r¹   rÁ   rÇ   rÔ   rØ   Úcontextmanagerrá   rç   rn   rè   ré   r_   rY   Únansumrê   Únanmeanrë   Únanprodrì   Únanstdrí   Únanvarrî   Ú	nanmedianÚnanmaxÚnanminrï   Ú
nancumprodrð   Ú	nancumsumró   rõ   rþ   r  rM   r*   r)   ú<module>r"     s½  ððð ð #Ð "Ð "Ð "Ð "Ð "à €€€ðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð Ø Ð Ð Ð Ð Ð Ø €€€Ø 
€
€
€
ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð Ð Ð Ð à Ð Ð Ð Ð Ð à KÐ KÐ KÐ KÐ KÐ Kðð ð ð ð ð ð ð ðð ð ð ð ð ð ð ð ð ð ð ð ð ð =Ð <Ð <Ð <Ð <Ð <à &Ð &Ð &Ð &Ð &Ð &àð 
ðð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ð ÐÐÐÐÐðð ð ð0
ð 
ð 
ð5ð 5ð 5ð 5ðpð ð ð,4ð 4ð 4ð,ð ,ð ,ð ,ð,ð ,ð ,ð ,ð0ð 0ð 0ð 0ð0ð 0ð 0ð 0ð,ð ,ð ,ð ,ð 
àDGðð ð ð ñ 
„ðð 
Ø VÐ VÐ VÐ Vñ 
„Ø Vðð ð ð ð ð@ <@ðð ð ð ð ð:ð ð ðð ð ð ð	ð 	ð 	ð 	ð	ð 	ð 	ð 	ð<ð <ð <ð <ð	ð 	ð 	ð 	ðð ð ð"ð ð ð&ð ð ð@ 
Ø HÐ HÐ Hñ 
„Ø Hð 
ð ð  ð  ñ 
„ð ð
 
ð  
ð  
ð  
ð  
ðF €WˆT�]„]€ð 
ðð ð ñ 
„ðð 
ðð ð ñ 
„ðð&*ð &*ð &*ð &*ðRIð Ið Iðð ð ð ð Ôð*ð *ð *ð *ñ Ôð*ð<

ð 

ð 

ð 

ðØ„L�%ðà„L�%ðð „L�%ðð „FˆEð	ð
 „FˆEðð „FˆEðð „Iˆuðð „GˆVðð „J�ðð „GˆVðð „J�ðð „FˆEðð „Iˆuðð „FˆEðð „Iˆuðð  „Iˆxð!ð" „L�(ð#ð$ „FˆEØ„IˆuØ„FˆEØ„IˆuØ„J�	Ø„M�9Ø„IˆxØ„L�(ð3ð €ð:"ð "ð "ð "ðTð Tð Tð Tð"ð ð ð ð r*   