ó
    Ñ]j{  ã                  ót   • S SK Jr  S SKJr  S SKrS SKJr  \(       a  S SKJr  \" S5       " S S5      5       r	g)	é    )Úannotations)ÚTYPE_CHECKINGN)Ú
set_module)ÚNDFrameÚpandasc                  ó˜   • \ rS rSr% SrS1rS\S'   SS jr\SS j5       r	\	R                  SS j5       r	SS	 jrSS
 jrSS jrSS jrSrg)ÚFlagsé   uù  
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]Ú_keysc               óF   • X l         [        R                  " U5      U l        g ©N)Ú_allows_duplicate_labelsÚweakrefÚrefÚ_obj)ÚselfÚobjr   s      ÚN/home/mande/repo/quber/.venv/lib/python3.13/site-packages/pandas/core/flags.pyÚ__init__ÚFlags.__init__?   s   € Ø(?Ô%Ü—K’K Ó$ˆ�	ó    c                ó   • U R                   $ )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   ÚFlags.allows_duplicate_labelsC   s   € ð< ×,Ñ,Ð,r   c                ó¶   • [        U5      nU R                  5       nUc  [        S5      eU(       d#  UR                   H  nUR	                  5         M     Xl        g )Nz$This flag's object has been deleted.)Úboolr   Ú
ValueErrorÚaxesÚ_maybe_check_uniquer   )r   Úvaluer   Úaxs       r   r   r   c   sL   € ä�U“ˆØ�i‰i‹kˆØ‰;ÜÐCÓDÐDæØ—h”h�Ø×&Ñ&Ö(ñ ð ).Õ%r   c                óL   • XR                   ;  a  [        U5      e[        X5      $ r   )r   ÚKeyErrorÚgetattr)r   Úkeys     r   Ú__getitem__ÚFlags.__getitem__p   s!   € Ø—j‘jÓ Ü˜3“-Ðä�tÓ!Ð!r   c                óp   • XR                   ;  a  [        SU SU R                    35      e[        XU5        g )NzUnknown flag z. Must be one of )r   r   Úsetattr)r   r&   r!   s      r   Ú__setitem__ÚFlags.__setitem__v   s3   € Ø—j‘jÓ Ü˜}¨S¨EÐ1BÀ4Ç:Á:À,ÐOÓPÐPÜ�˜5Õ!r   c                ó"   • SU R                    S3$ )Nz<Flags(allows_duplicate_labels=z)>)r   r   s    r   Ú__repr__ÚFlags.__repr__{   s   € Ø0°×1MÑ1MÐ0NÈbÐQÐQr   c                ój   • [        U[        U 5      5      (       a  U R                  UR                  :H  $ g)NF)Ú
isinstanceÚtyper   )r   Úothers     r   Ú__eq__ÚFlags.__eq__~   s-   € Ü�eœT $›Z×(Ñ(Ø×/Ñ/°5×3PÑ3PÑPÐPØr   )r   r   N)r   r   r   r   ÚreturnÚNone)r6   r   )r!   r   r6   r7   )r&   Ústr)r&   r8   r6   r7   )r6   r8   )r3   Úobjectr6   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__Ú__doc__r   Ú__annotations__r   Úpropertyr   Úsetterr'   r+   r.   r4   Ú__static_attributes__© r   r   r	   r	      s_   ‡ ñ-ð^ 1Ð1€Eˆ8Ó1ô%ð ó-ó ð-ð> ×#Ñ#ó
.ó $ð
.ô"ô"ô
R÷r   r	   )
Ú
__future__r   Útypingr   r   Úpandas.util._decoratorsr   Úpandas.core.genericr   r	   rC   r   r   Ú<module>rH      s8   ðÝ "å  Û å .æÝ+ñ ˆHÓ÷tð tó ñtr   