+
    ÏÜ³jßC  ã                  ód  € R t ^ RIHt ^ RIt^ RIHtHt ^ RIt^ RIH	t	 ^ RI
Ht ]'       d   ^ RIHt ^ RIHt ^ RIHt ^ R	IHt  ! R
 R4      t ! R R4      tRR R3R R llt ! R R4      t]tR R ltRt]	! R4      R R l4       tRt]	! R4      R R l4       tRt]	! R4      R R  l4       tR# )!z†

accessor.py contains base classes for implementing accessor properties
that can be mixed into or pinned onto other pandas classes.

)ÚannotationsN)ÚTYPE_CHECKINGÚfinal)Ú
set_module)Úfind_stack_level)ÚCallable)ÚTypeT©ÚIndex)ÚNDFramec                  ó‚   a € ] tR t^t$ ]! 4       tR]R&   ]! 4       tR]R&   ]	R R l4       t
R R ltR	 V 3R
 lltRtV ;t# )ÚDirNamesMixinúset[str]Ú
_accessorszfrozenset[str]Ú_hidden_attrsc               ó   € V ^8„  d   QhRR/# ©é   Úreturnr   © )Úformats   "ÚU/home/luca/screen-checking/.venv/lib/python3.14/site-packages/pandas/core/accessor.pyÚ__annotate__ÚDirNamesMixin.__annotate__$   s   € ÷ 4ñ 4 ñ 4ó    c                ó<   € V P                   V P                  ,          # )z*
Delete unwanted __dir__ for this object.
)r   r   )Úselfs   &r   Ú_dir_deletionsÚDirNamesMixin._dir_deletions#   s   € ð
 �‰ ×!3Ñ!3Õ3Ð3r   c               ó   € V ^8„  d   QhRR/# r   r   )r   s   "r   r   r   *   s   € ÷ Uñ U ñ Ur   c                ój   € V P                    Uu0 uF  p\        W4      '       g   K  VkK  	  up# u upi )z)
Add additional __dir__ for this object.
)r   Úhasattr)r   Úaccessors   & r   Ú_dir_additionsÚDirNamesMixin._dir_additions*   s)   € ð *.¯ªÓT©˜X¼GÀD×<S—�©ÑTÐTùÒTs   �0§0c               ó   € V ^8„  d   QhRR/# )r   r   ú	list[str]r   )r   s   "r   r   r   0   s   € ÷ 
ñ 
˜ñ 
r   c                óž   <€ \        \        SV `	  4       4      pWP                  4       ,
          V P	                  4       ,          p\        V4      # )zX
Provide method name lookup and completion.

Notes
-----
Only provide 'public' methods.
)ÚsetÚsuperÚ__dir__r   r#   Úsorted)r   ÚrvÚ	__class__s   & €r   r*   ÚDirNamesMixin.__dir__0   s?   ø€ ô ”‘‘Ó"Ó#ˆØ×&Ñ&Ó(Õ(¨D×,?Ñ,?Ó,AÕAˆÜ�b‹zÐr   r   )Ú__name__Ú
__module__Ú__qualname__Ú__firstlineno__r(   r   Ú__annotations__Ú	frozensetr   r   r   r#   r*   Ú__static_attributes__Ú__classcell__)r-   s   @r   r   r      s=   ø‡ Ù›5€J�Ó Ù$-£K€M�>Ó/à
ô4ó ð4õU÷
ö 
r   r   c                  ó`   € ] tR t^=tRtR R ltR R ltR R lt]RR	 R
3R R ll4       t	Rt
R# )ÚPandasDelegatez8
Abstract base class for delegating methods/properties.
c               ó   € V ^8„  d   QhRR/# ©r   ÚnameÚstrr   )r   s   "r   r   ÚPandasDelegate.__annotate__B   s   € ÷ Bñ B¨3ñ Br   c                	ó   € \        R V 24      h)zYou cannot access the property ©Ú	TypeError©r   r;   ÚargsÚkwargss   &&*,r   Ú_delegate_property_getÚ%PandasDelegate._delegate_property_getB   s   € ÜÐ9¸$¸Ð@ÓAÐAr   c               ó    € V ^8„  d   QhRRRR/# ©r   r;   r<   r   ÚNoner   )r   s   "r   r   r=   E   s   € ÷ >ñ >¨3ð >È4ñ >r   c                	ó    € \        R V R24      h)zThe property z cannot be setr?   )r   r;   ÚvaluerB   rC   s   &&&*,r   Ú_delegate_property_setÚ%PandasDelegate._delegate_property_setE   s   € Ü˜-¨ v¨^Ð<Ó=Ð=r   c               ó   € V ^8„  d   QhRR/# r:   r   )r   s   "r   r   r=   H   s   € ÷ :ñ : Sñ :r   c                	ó   € \        R V 24      h)zYou cannot call method r?   rA   s   &&*,r   Ú_delegate_methodÚPandasDelegate._delegate_methodH   s   € ÜÐ1°$°Ð8Ó9Ð9r   Fc                	ó   € V # ©Nr   ©Úxs   &r   Ú<lambda>ÚPandasDelegate.<lambda>R   s   € ¹1r   Tc               ó0   € V ^8„  d   QhRRRRRRRRR	RR
R/# )r   Ú	accessorsr&   Útypr<   Ú	overwriteÚboolÚaccessor_mappingúCallable[[str], str]Úraise_on_missingr   rH   r   )r   s   "r   r   r=   L   sP   € ÷ E&ñ E&ð ðE&ð ð	E&ð
 ðE&ð /ðE&ð ðE&ð 
ñE&r   c                ó   aa€ R VV3R llpR VV3R llpV Fa  p	V'       g   \        SS! V	4      R4      f   K"  VR8X  d
   V! V	4      p
MV! V	4      p
V'       g   \        W	4      '       d   KU  \        W	V
4       Kc  	  R# )a\  
Add accessors to cls from the delegate class.

Parameters
----------
cls
    Class to add the methods/properties to.
delegate
    Class to get methods/properties and docstrings.
accessors : list of str
    List of accessors to add.
typ : {'property', 'method'}
overwrite : bool, default False
    Overwrite the method/property in the target class if it exists.
accessor_mapping: Callable, default lambda x: x
    Callable to map the delegate's function to the cls' function.
raise_on_missing: bool, default True
    Raise if an accessor does not exist on delegate.
    False skips the missing accessor.
c               ó   € V ^8„  d   QhRR/# r:   r   )r   s   "r   r   Ú<PandasDelegate._add_delegate_accessors.<locals>.__annotate__j   s   € ÷ 	ñ 	¨Sñ 	r   c           
     óŠ   <a € V 3R  lpV 3R lpS Vn         S Vn         \        VV\        SS! S 4      4      P                  R7      # )c                ó&   <€ V P                  S4      # rR   )rD   )r   r;   s   &€r   Ú_getterÚ[PandasDelegate._add_delegate_accessors.<locals>._create_delegator_property.<locals>._getterk   s   ø€ Ø×2Ñ2°4Ó8Ð8r   c                ó(   <€ V P                  SV4      # rR   )rK   )r   Ú
new_valuesr;   s   &&€r   Ú_setterÚ[PandasDelegate._add_delegate_accessors.<locals>._create_delegator_property.<locals>._settern   s   ø€ Ø×2Ñ2°4¸ÓDÐDr   )ÚfgetÚfsetÚdoc)r/   ÚpropertyÚgetattrÚ__doc__)r;   rd   rh   r\   Údelegates   f  €€r   Ú_create_delegator_propertyÚJPandasDelegate._add_delegate_accessors.<locals>._create_delegator_propertyj   sI   ù€ õ9õEð  $ˆGÔØ#ˆGÔäØØÜ˜HÑ&6°tÓ&<Ó=×EÑEôð r   c               ó   € V ^8„  d   QhRR/# r:   r   )r   s   "r   r   ra   z   s   € ÷ 	ñ 	¨3ñ 	r   c                ól   <a € \        SS! S 4      4      p\        P                  ! V4      V 3R  l4       pV# )c                ó0   <€ V P                   ! S.VO5/ VB # rR   )rO   )r   rB   rC   r;   s   &*,€r   ÚfÚSPandasDelegate._add_delegate_accessors.<locals>._create_delegator_method.<locals>.f}   s   ø€ à×,Ò,¨TÐC°DÒC¸FÑCÐCr   )rn   Ú	functoolsÚwraps)r;   Úmethodrv   r\   rp   s   f  €€r   Ú_create_delegator_methodÚHPandasDelegate._add_delegate_accessors.<locals>._create_delegator_methodz   s9   ù€ Ü˜XÑ'7¸Ó'=Ó>ˆFä�_Š_˜VÓ$ôDó %ðDð ˆHr   Nrm   )rn   r!   Úsetattr)Úclsrp   rX   rY   rZ   r\   r^   rq   r{   r;   rv   s   &f&&&f&    r   Ú_add_delegate_accessorsÚ&PandasDelegate._add_delegate_accessorsK   ss   ù€ ÷>	ñ 	÷ 	ñ 	ó ˆDç$Ü˜HÑ&6°tÓ&<¸dÓCÒKáà�jÔ Ù.¨tÓ4‘á,¨TÓ2�÷ ¤¨× 2Ô 2Ü˜ 1Ö%ó r   r   N)r/   r0   r1   r2   ro   rD   rK   rO   Úclassmethodr   r5   r   r   r   r8   r8   =   s8   † ñõBõ>õ:ð ð  Ù1<Ø!%öE&ó ôE&r   r8   Fc                ó   € V # rR   r   rS   s   &r   rU   rU   ™   s   € ±qr   Tc          
     ó,   € V ^8„  d   QhRRRRRRRRR	R/# )
r   rX   r&   rY   r<   rZ   r[   r\   r]   r^   r   )r   s   "r   r   r   ”   s<   € ÷ 3"ñ 3"àð3"ð 
ð3"ð ð	3"ð
 +ð3"ð ñ3"r   c                ó(   a aaaaa€ VVV VVV3R lpV# )aj  
Add delegated names to a class using a class decorator.  This provides
an alternative usage to directly calling `_add_delegate_accessors`
below a class definition.

Parameters
----------
delegate : object
    The class to get methods/properties & docstrings.
accessors : Sequence[str]
    List of accessor to add.
typ : {'property', 'method'}
overwrite : bool, default False
   Overwrite the method/property in the target class if it exists.
accessor_mapping: Callable, default lambda x: x
    Callable to map the delegate's function to the cls' function.
raise_on_missing: bool, default True
    Raise if an accessor does not exist on delegate.
    False skips the missing accessor.

Returns
-------
callable
    A class decorator.

Examples
--------
@delegate_names(Categorical, ["categories", "ordered"], "property")
class CategoricalAccessor(PandasDelegate):
    [...]
c           	     ó6   <€ V P                  SSSSSSR 7       V # ))rZ   r\   r^   )r   )r~   r\   rX   rp   rZ   r^   rY   s   &€€€€€€r   Úadd_delegate_accessorsÚ.delegate_names.<locals>.add_delegate_accessors¼   s/   ø€ Ø×#Ñ#ØØØØØ-Ø-ð 	$ô 	
ð ˆ
r   r   )rp   rX   rY   rZ   r\   r^   r†   s   ffffff r   Údelegate_namesrˆ   ”   s   ý€ ÷P	ò 	ð "Ð!r   c                  ó,   € ] tR t^ÊtRtR R ltR tRtR# )ÚAccessoraa  
Custom property-like object.

A descriptor for accessors.

Parameters
----------
name : str
    Namespace that will be accessed under, e.g. ``df.foo``.
accessor : cls
    Class with the extension methods.

Notes
-----
For accessor, The class's __init__ method assumes that one of
``Series``, ``DataFrame`` or ``Index`` as the
single argument ``data``.
c               ó    € V ^8„  d   QhRRRR/# rG   r   )r   s   "r   r   ÚAccessor.__annotate__Þ   s   € ÷ "ñ "˜Sð "¨tñ "r   c                	ó   € Wn         W n        R # rR   )Ú_nameÚ	_accessor)r   r;   r"   s   &&&r   Ú__init__ÚAccessor.__init__Þ   s   € ØŒ
Ø!Žr   c                	óD   € Vf   V P                   # V P                  V4      # rR   )r�   )r   Úobjr~   s   &&&r   Ú__get__ÚAccessor.__get__â   s    € ØŠ;à—>‘>Ð!Ø�~‰~˜cÓ"Ð"r   )r�   rŽ   N)r/   r0   r1   r2   ro   r�   r”   r5   r   r   r   rŠ   rŠ   Ê   s   † ñõ&"ö#r   rŠ   c               ó$   € V ^8„  d   QhRRRRRR/# )r   r;   r<   r~   ztype[NDFrame | Index]r   úCallable[[TypeT], TypeT]r   )r   s   "r   r   r   î   s$   € ÷ :ñ :Ø
ð:Ø)ð:àñ:r   c                ó   a a€ R VV 3R llpV# )a%  
Register a custom accessor on objects.

Parameters
----------
name : str
    Name under which the accessor should be registered. A warning is issued
    if this name conflicts with a preexisting attribute.

Returns
-------
callable
    A class decorator.

See Also
--------
register_dataframe_accessor : Register a custom accessor on DataFrame objects.
register_series_accessor : Register a custom accessor on Series objects.
register_index_accessor : Register a custom accessor on Index objects.

Notes
-----
This function allows you to register a custom-defined accessor class
for pandas objects (DataFrame, Series, or Index).
The requirements for the accessor class are as follows:

* Must contain an init method that:

  * accepts a single object

  * raises an AttributeError if the object does not have correctly
    matching inputs for the accessor

* Must contain a method for each access pattern.

  * The methods should be able to take any argument signature.

  * Accessible using the @property decorator if no additional arguments are
    needed.

c               ó    € V ^8„  d   QhRRRR/# )r   r"   r   r   r   )r   s   "r   r   Ú(_register_accessor.<locals>.__annotate__  s   € ÷ ñ ˜Eð  eñ r   c           	     óô   <€ \        SS4      '       d3   \        P                  ! R V : RS: RS: R2\        \	        4       R7       \        SS\        SV 4      4       SP                  P                  S4       V # )zregistration of accessor z under name z
 for type z: is overriding a preexisting attribute with the same name.)Ú
stacklevel)	r!   ÚwarningsÚwarnÚUserWarningr   r}   rŠ   r   Úadd)r"   r~   r;   s   &€€r   Ú	decoratorÚ%_register_accessor.<locals>.decorator  sq   ø€ Ü�3˜×ÒÜ�MŠMØ+¨H©<°|Ø‘(˜* S¡Gð ,0ð1ô Ü+Ó-õô 	��Tœ8 D¨(Ó3Ô4Ø�‰×Ñ˜4Ô Øˆr   r   )r;   r~   r¡   s   ff r   Ú_register_accessorr£   î   s   ù€ ÷Zñ ð Ðr   aä  
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_dataframe_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not all(pandas_obj[col].dtype == 'int64' for col in pandas_obj.columns):
...             raise AttributeError("All columns must contain integer values only")
...         self._obj = pandas_obj
...
...     def sum(self):
...         return self._obj.sum()
...
>>> df = pd.DataFrame([[1, 2], ['x', 'y']])
>>> df.int_accessor
Traceback (most recent call last):
...
AttributeError: All columns must contain integer values only.
>>> df = pd.DataFrame([[1, 2], [3, 4]])
>>> df.int_accessor.sum()
0    4
1    6
dtype: int64zpandas.api.extensionsc               ó    € V ^8„  d   QhRRRR/# ©r   r;   r<   r   r—   r   )r   s   "r   r   r   F  s   € ÷ E/ñ E/ cð E/Ð.Fñ E/r   c                ó$   € ^ RI Hp \        W4      # )a0  
Register a custom accessor on DataFrame objects.

Parameters
----------
name : str
    Name under which the accessor should be registered. A warning is issued
    if this name conflicts with a preexisting attribute.

Returns
-------
callable
    A class decorator.

See Also
--------
register_dataframe_accessor : Register a custom accessor on DataFrame objects.
register_series_accessor : Register a custom accessor on Series objects.
register_index_accessor : Register a custom accessor on Index objects.

Notes
-----
This function allows you to register a custom-defined accessor class for DataFrame.
The requirements for the accessor class are as follows:

* Must contain an init method that:

  * accepts a single DataFrame object

  * raises an AttributeError if the DataFrame object does not have correctly
    matching inputs for the accessor

* Must contain a method for each access pattern.

  * The methods should be able to take any argument signature.

  * Accessible using the @property decorator if no additional arguments are
    needed.

Examples
--------
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_dataframe_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not all(
...             pandas_obj[col].dtype == "int64" for col in pandas_obj.columns
...         ):
...             raise AttributeError("All columns must contain integer values only")
...         self._obj = pandas_obj
...
...     def sum(self):
...         return self._obj.sum()
>>> df = pd.DataFrame([[1, 2], ["x", "y"]])
>>> df.int_accessor
Traceback (most recent call last):
...
AttributeError: All columns must contain integer values only.
>>> df = pd.DataFrame([[1, 2], [3, 4]])
>>> df.int_accessor.sum()
0    4
1    6
dtype: int64
)Ú	DataFrame)Úpandasr§   r£   )r;   r§   s   & r   Úregister_dataframe_accessorr©   E  s   € õH !ä˜dÓ.Ð.r   a„  
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_series_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not pandas_obj.dtype == 'int64':
...             raise AttributeError("The series must contain integer data only")
...         self._obj = pandas_obj
...
...     def sum(self):
...         return self._obj.sum()
...
>>> df = pd.Series([1, 2, 'x'])
>>> df.int_accessor
Traceback (most recent call last):
...
AttributeError: The series must contain integer data only.
>>> df = pd.Series([1, 2, 3])
>>> df.int_accessor.sum()
6c               ó    € V ^8„  d   QhRRRR/# r¥   r   )r   s   "r   r   r   §  s   € ÷ A,ñ A, 3ð A,Ð+Cñ A,r   c                ó$   € ^ RI Hp \        W4      # )a¦  
Register a custom accessor on Series objects.

Parameters
----------
name : str
    Name under which the accessor should be registered. A warning is issued
    if this name conflicts with a preexisting attribute.

Returns
-------
callable
    A class decorator.

See Also
--------
register_dataframe_accessor : Register a custom accessor on DataFrame objects.
register_series_accessor : Register a custom accessor on Series objects.
register_index_accessor : Register a custom accessor on Index objects.

Notes
-----
This function allows you to register a custom-defined accessor class for Series.
The requirements for the accessor class are as follows:

* Must contain an init method that:

  * accepts a single Series object

  * raises an AttributeError if the Series object does not have correctly
    matching inputs for the accessor

* Must contain a method for each access pattern.

  * The methods should be able to take any argument signature.

  * Accessible using the @property decorator if no additional arguments are
    needed.

Examples
--------
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_series_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not pandas_obj.dtype == "int64":
...             raise AttributeError("The series must contain integer data only")
...         self._obj = pandas_obj
...
...     def sum(self):
...         return self._obj.sum()
>>> df = pd.Series([1, 2, "x"])
>>> df.int_accessor
Traceback (most recent call last):
...
AttributeError: The series must contain integer data only.
>>> df = pd.Series([1, 2, 3])
>>> df.int_accessor.sum()
6
)ÚSeries)r¨   r¬   r£   )r;   r¬   s   & r   Úregister_series_accessorr­   ¦  s   € õ@ ä˜dÓ+Ð+r   a[  
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_index_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not all(isinstance(x, int) for x in pandas_obj):
...             raise AttributeError("The index must only be an integer value")
...         self._obj = pandas_obj
...
...     def even(self):
...         return [x for x in self._obj if x % 2 == 0]
>>> df = pd.DataFrame.from_dict(
...     {"row1": {"1": 1, "2": "a"}, "row2": {"1": 2, "2": "b"}}, orient="index"
... )
>>> df.index.int_accessor
Traceback (most recent call last):
...
AttributeError: The index must only be an integer value.
>>> df = pd.DataFrame(
...     {"col1": [1, 2, 3, 4], "col2": ["a", "b", "c", "d"]}, index=[1, 2, 5, 8]
... )
>>> df.index.int_accessor.even()
[2, 8]c               ó    € V ^8„  d   QhRRRR/# r¥   r   )r   s   "r   r   r     s   € ÷ E+ñ E+ #ð E+Ð*Bñ E+r   c                ó$   € ^ RI Hp \        W4      # )a}  
Register a custom accessor on Index objects.

Parameters
----------
name : str
    Name under which the accessor should be registered. A warning is issued
    if this name conflicts with a preexisting attribute.

Returns
-------
callable
    A class decorator.

See Also
--------
register_dataframe_accessor : Register a custom accessor on DataFrame objects.
register_series_accessor : Register a custom accessor on Series objects.
register_index_accessor : Register a custom accessor on Index objects.

Notes
-----
This function allows you to register a custom-defined accessor class for Index.
The requirements for the accessor class are as follows:

* Must contain an init method that:

  * accepts a single Index object

  * raises an AttributeError if the Index object does not have correctly
    matching inputs for the accessor

* Must contain a method for each access pattern.

  * The methods should be able to take any argument signature.

  * Accessible using the @property decorator if no additional arguments are
    needed.

Examples
--------
An accessor that only accepts integers could
have a class defined like this:

>>> @pd.api.extensions.register_index_accessor("int_accessor")
... class IntAccessor:
...     def __init__(self, pandas_obj):
...         if not all(isinstance(x, int) for x in pandas_obj):
...             raise AttributeError("The index must only be an integer value")
...         self._obj = pandas_obj
...
...     def even(self):
...         return [x for x in self._obj if x % 2 == 0]
>>> df = pd.DataFrame.from_dict(
...     {"row1": {"1": 1, "2": "a"}, "row2": {"1": 2, "2": "b"}}, orient="index"
... )
>>> df.index.int_accessor
Traceback (most recent call last):
...
AttributeError: The index must only be an integer value.
>>> df = pd.DataFrame(
...     {"col1": [1, 2, 3, 4], "col2": ["a", "b", "c", "d"]}, index=[1, 2, 5, 8]
... )
>>> df.index.int_accessor.even()
[2, 8]
r	   )r¨   r
   r£   )r;   r
   s   & r   Úregister_index_accessorr°     s   € õH ä˜dÓ*Ð*r   ) ro   Ú
__future__r   rx   Útypingr   r   r�   Úpandas.util._decoratorsr   Úpandas.util._exceptionsr   Úcollections.abcr   Úpandas._typingr   r¨   r
   Úpandas.core.genericr   r   r8   rˆ   rŠ   ÚCachedAccessorr£   Ú_register_df_examplesr©   Ú_register_series_examplesr­   Ú_register_index_examplesr°   r   r   r   Ú<module>r¼      sã   ðñõ #ã ÷ó õõ 5çÝ(å$åÝ+÷ñ ÷<T&ñ T&ðv Ù-8Ø!÷3"÷l#ñ #ðB €õ:ðzÐ ñ4 Ð#Ó$ôE/ó %ðE/ðPÐ ñ0 Ð#Ó$ôA,ó %ðA,ðH
Ð ñ6 Ð#Ó$ôE+ó %òE+r   