§
    tŠtj{  ã                  ó~   — d dl mZ d dlmZ d dlZd dlmZ erd dlmZ  ed¦  «         G d„ d¦  «        ¦   «         Z	dS )	é    )Úannotations)ÚTYPE_CHECKINGN)Ú
set_module)ÚNDFrameÚpandasc                  ó†   — 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dS )ÚFlagsu�  
    Flags that apply to pandas objects.

    â€œFlagsâ€� differ from â€œmetadataâ€�. Flags reflect properties of the pandas
    object (the Series or DataFrame). Metadata refer to properties of the
    dataset, and should be stored in DataFrame.attrs.

    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``.

    See Also
    --------
    DataFrame.attrs : Dictionary of global attributes of this dataset.
    Series.attrs : Dictionary of global attributes of this dataset.

    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]Ú_keysÚobjr   ÚboolÚreturnÚNonec               óF   — || _         t          j        |¦  «        | _        d S ©N)Ú_allows_duplicate_labelsÚweakrefÚrefÚ_obj)Úselfr   r
   s      úO/var/www/html/CA-Chatbot/venv/lib/python3.11/site-packages/pandas/core/flags.pyÚ__init__zFlags.__init__?   s   € Ø(?ˆÔ%Ý”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_labelsC   s   € ð< Ô,Ð,r   Úvaluec                ó¼   — t          |¦  «        }|                      ¦   «         }|€t          d¦  «        ‚|s|j        D ]}|                     ¦   «          Œ|| _        d S )Nz$This flag's object has been deleted.)r   r   Ú
ValueErrorÚaxesÚ_maybe_check_uniquer   )r   r   r   Úaxs       r   r
   zFlags.allows_duplicate_labelsc   sj   € å�U‘”ˆØ�iŠi‰kŒkˆØˆ;ÝÐCÑDÔDÐDàð 	)Ø”hð )ð )�Ø×&Ò&Ñ(Ô(Ð(Ð(à(-ˆÔ%Ð%Ð%r   ÚkeyÚstrc                óR   — || j         vrt          |¦  «        ‚t          | |¦  «        S r   )r   ÚKeyErrorÚgetattr)r   r"   s     r   Ú__getitem__zFlags.__getitem__p   s+   € Ø�d”jÐ Ð Ý˜3‘-”-Ðå�t˜SÑ!Ô!Ð!r   c                ón   — || j         vrt          d|› d| j         › �¦  «        ‚t          | ||¦  «         d S )NzUnknown flag z. Must be one of )r   r   Úsetattr)r   r"   r   s      r   Ú__setitem__zFlags.__setitem__v   sH   € Ø�d”jÐ Ð ÝÐO¨SÐOÐOÀ4Ä:ÐOÐOÑPÔPÐPÝ��c˜5Ñ!Ô!Ð!Ð!Ð!r   c                ó   — d| j         › d�S )Nz<Flags(allows_duplicate_labels=z)>)r
   r   s    r   Ú__repr__zFlags.__repr__{   s   € ØQ°Ô1MÐQÐQÐQÐQr   ÚotherÚobjectc                ó`   — t          |t          | ¦  «        ¦  «        r| j        |j        k    S dS )NF)Ú
isinstanceÚtyper
   )r   r-   s     r   Ú__eq__zFlags.__eq__~   s1   € Ý�e�T $™ZœZÑ(Ô(ð 	QØÔ/°5Ô3PÒPÐPØˆur   N)r   r   r
   r   r   r   )r   r   )r   r   r   r   )r"   r#   )r"   r#   r   r   )r   r#   )r-   r.   r   r   )Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Ú__annotations__r   Úpropertyr
   Úsetterr'   r*   r,   r2   © r   r   r	   r	      sã   € € € € € € ð-ð -ð^ 1Ð1€EÐ1Ð1Ð1Ñ1ð%ð %ð %ð %ð ð-ð -ð -ñ „Xð-ð> Ô#ð
.ð 
.ð 
.ñ $Ô#ð
.ð"ð "ð "ð "ð"ð "ð "ð "ð
Rð Rð Rð Rðð ð ð ð ð r   r	   )
Ú
__future__r   Útypingr   r   Úpandas.util._decoratorsr   Úpandas.core.genericr   r	   r:   r   r   ú<module>r?      s±   ðØ "Ð "Ð "Ð "Ð "Ð "à  Ð  Ð  Ð  Ð  Ð  Ø €€€à .Ð .Ð .Ð .Ð .Ð .àð ,Ø+Ð+Ð+Ð+Ð+Ð+ð €ˆHÑÔðtð tð tð tð tñ tô tñ Ôðtð tð tr   