§
    ÚóÉjŽ  ã                  ó¸   — d dl mZ d dlmZmZmZ d dlmZ d dlm	Z	 d dl
mZmZ d dlmZ d dlmZ erd dlmZ  ed	d
¬¦  «        Z G d„ dee         ¦  «        ZdS )é    )Úannotations)ÚTYPE_CHECKINGÚGenericÚTypeVar)Ú#GET_CATEGORIES_DEPRECATION_TEMPLATE)Úissue_deprecation_warning)ÚExprKindÚExprNode)ÚVersion)ÚString)ÚExprÚExprTr   )Úboundc                  ó   — e Zd Zdd„Zd	d„ZdS )
ÚExprCatNamespaceÚexprr   ÚreturnÚNonec                ó   — || _         d S )N)Ú_expr)Úselfr   s     út/home/lighthouse/badge-speaker-benchmark/.benchmark-venv-community/lib/python3.11/site-packages/narwhals/expr_cat.pyÚ__init__zExprCatNamespace.__init__   s   € ØˆŒ
ˆ
ˆ
ó    c                ó|  — | j         j        t          j        t          j        hv r2| j                              t          t          j        d¦  «        ¦  «        S t          t          j        d¬¦  «        d¬¦  «         | j                              ¦   «                              ¦   «                              t          ¦  «        S )a³  Get unique categories from column.

        Warning:
            This is deprecated and it will be removed in a future version, as Polars
            removed its own `cat.get_categories`.
            To get the distinct values present in a Categorical column, use
            [`Expr.unique`][narwhals.Expr.unique].
            For the fixed category list of an Enum, use its `dtype.categories`.

            Until it is removed, it is implemented as
            `unique().drop_nulls().cast(String)`, so it returns only the values which
            are actually present, in no guaranteed order.

        Note:
            In `narwhals.stable.v1` and `narwhals.stable.v2` this stays available, and
            keeps dispatching to each backend's native implementation.

        Examples:
            >>> import pandas as pd
            >>> import narwhals.stable.v1 as nw
            >>> df_native = pd.DataFrame(
            ...     {"fruits": ["apple", "mango", "mango"]}, dtype="category"
            ... )
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("fruits").cat.get_categories()).to_native()
              fruits
            0  apple
            1  mango
        zcat.get_categoriesr   )Úclsz2.26.0)Ú_version)r   r   r   ÚV1ÚV2Ú_append_noder
   r	   Ú
FILTRATIONr   r   ÚformatÚuniqueÚ
drop_nullsÚcastr   )r   s    r   Úget_categorieszExprCatNamespace.get_categories   s¤   € ð< Œ:Ô¥7¤:­w¬zÐ":Ð:Ð:Ø”:×*Ò*Ý�Ô,Ð.BÑCÔCñô ð õ 	"Ý/Ô6¸6ÐBÑBÔBÈXð	
ñ 	
ô 	
ð 	
ð Œz× Ò Ñ"Ô"×-Ò-Ñ/Ô/×4Ò4µVÑ<Ô<Ð<r   N)r   r   r   r   )r   r   )Ú__name__Ú
__module__Ú__qualname__r   r&   © r   r   r   r      s<   € € € € € ðð ð ð ð&=ð &=ð &=ð &=ð &=ð &=r   r   N)Ú
__future__r   Útypingr   r   r   Únarwhals._constantsr   Únarwhals._exceptionsr   Únarwhals._expression_parsingr	   r
   Únarwhals._utilsr   Únarwhals.dtypesr   Únarwhals.exprr   r   r   r*   r   r   ú<module>r3      sû   ðØ "Ð "Ð "Ð "Ð "Ð "à 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2Ð 2à CÐ CÐ CÐ CÐ CÐ CØ :Ð :Ð :Ð :Ð :Ð :Ø ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ø #Ð #Ð #Ð #Ð #Ð #Ø "Ð "Ð "Ð "Ð "Ð "àð #Ø"Ð"Ð"Ð"Ð"Ð"àˆ�˜vÐ&Ñ&Ô&€ð*=ð *=ð *=ð *=ð *=�w˜u”~ñ *=ô *=ð *=ð *=ð *=r   