Ë
    ¤eh³  ã                  óH   — d dl mZ d dlmZ d dlZerd dlmZ  G d„ d«      Zy)é    )Úannotations)ÚTYPE_CHECKINGN)ÚNDFramec                  ó‚   — e Zd ZU dZdhZded<   dd„Zedd„«       Zej                  dd„«       Zdd„Z
dd	„Zdd
„Zdd„Zy)ÚFlagsa  
    Flags that apply to pandas objects.

    Parameters
    ----------
    obj : Series or DataFrame
        The object these flags are associated with.
    allows_duplicate_labels : bool, default True
        Whether to allow duplicate labels in this object. By default,
        duplicate labels are permitted. Setting this to ``False`` will
        cause an :class:`errors.DuplicateLabelError` to be raised when
        `index` (or columns for DataFrame) is not unique, or any
        subsequent operation on introduces duplicates.
        See :ref:`duplicates.disallow` for more.

        .. warning::

           This is an experimental feature. Currently, many methods fail to
           propagate the ``allows_duplicate_labels`` value. In future versions
           it is expected that every method taking or returning one or more
           DataFrame or Series objects will propagate ``allows_duplicate_labels``.

    Examples
    --------
    Attributes can be set in two ways:

    >>> df = pd.DataFrame()
    >>> df.flags
    <Flags(allows_duplicate_labels=True)>
    >>> df.flags.allows_duplicate_labels = False
    >>> df.flags
    <Flags(allows_duplicate_labels=False)>

    >>> df.flags['allows_duplicate_labels'] = True
    >>> df.flags
    <Flags(allows_duplicate_labels=True)>
    Úallows_duplicate_labelszset[str]Ú_keysc               óF   — || _         t        j                  |«      | _        y ©N)Ú_allows_duplicate_labelsÚweakrefÚrefÚ_obj)ÚselfÚobjr   s      úO/var/www/skyplay_api_hub/venv/lib/python3.12/site-packages/pandas/core/flags.pyÚ__init__zFlags.__init__3   s   € Ø(?ˆÔ%Ü—K‘K Ó$ˆ�	ó    c                ó   — | j                   S )a�  
        Whether this object allows duplicate labels.

        Setting ``allows_duplicate_labels=False`` ensures that the
        index (and columns of a DataFrame) are unique. Most methods
        that accept and return a Series or DataFrame will propagate
        the value of ``allows_duplicate_labels``.

        See :ref:`duplicates` for more.

        See Also
        --------
        DataFrame.attrs : Set global metadata on this object.
        DataFrame.set_flags : Set global flags on this object.

        Examples
        --------
        >>> df = pd.DataFrame({"A": [1, 2]}, index=['a', 'a'])
        >>> df.flags.allows_duplicate_labels
        True
        >>> df.flags.allows_duplicate_labels = False
        Traceback (most recent call last):
            ...
        pandas.errors.DuplicateLabelError: Index has duplicates.
              positions
        label
        a        [0, 1]
        )r   ©r   s    r   r   zFlags.allows_duplicate_labels7   s   € ð< ×,Ñ,Ð,r   c                ó¨   — t        |«      }| j                  «       }|€t        d«      ‚|s!|j                  D ]  }|j	                  «        Œ || _        y )Nz$This flag's object has been deleted.)Úboolr   Ú
ValueErrorÚaxesÚ_maybe_check_uniquer   )r   Úvaluer   Úaxs       r   r   zFlags.allows_duplicate_labelsW   sS   € ä�U“ˆØ�i‰i‹kˆØˆ;ÜÐCÓDÐDáØ—h‘hò )�Ø×&Ñ&Õ(ð)ð ).ˆÕ%r   c                óL   — || j                   vrt        |«      ‚t        | |«      S r   )r	   ÚKeyErrorÚgetattr)r   Úkeys     r   Ú__getitem__zFlags.__getitem__d   s%   € Ø�d—j‘jÑ Ü˜3“-Ðä�t˜SÓ!Ð!r   c                óp   — || j                   vrt        d|› d| j                   › �«      ‚t        | ||«       y )NzUnknown flag z. Must be one of )r	   r   Úsetattr)r   r!   r   s      r   Ú__setitem__zFlags.__setitem__j   s7   € Ø�d—j‘jÑ Ü˜}¨S¨EÐ1BÀ4Ç:Á:À,ÐOÓPÐPÜ��c˜5Õ!r   c                ó"   — d| j                   › d�S )Nz<Flags(allows_duplicate_labels=z)>)r   r   s    r   Ú__repr__zFlags.__repr__o   s   € Ø0°×1MÑ1MÐ0NÈbÐQÐQr   c                ó`   — t        |t        | «      «      r| j                  |j                  k(  S y)NF)Ú
isinstanceÚtyper   )r   Úothers     r   Ú__eq__zFlags.__eq__r   s*   € Ü�eœT $›ZÔ(Ø×/Ñ/°5×3PÑ3PÑPÐPØr   N)r   r   r   r   ÚreturnÚNone)r-   r   )r   r   r-   r.   )r!   Ústr)r!   r/   r-   r.   )r-   r/   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r	   Ú__annotations__r   Úpropertyr   Úsetterr"   r%   r'   r,   © r   r   r   r   
   s_   … ñ$ðL 1Ð1€Eˆ8Ó1ó%ð ò-ó ð-ð> ×#Ñ#ò
.ó $ð
.ó"ó"ó
Rôr   r   )Ú
__future__r   Útypingr   r   Úpandas.core.genericr   r   r7   r   r   ú<module>r;      s    ðÝ "å  Û áÝ+÷kò kr   