
    Wh                    d    d dl mZ d dlmZmZmZ erd dlmZ  edd      Z G d dee         Z	y	)
    )annotations)TYPE_CHECKINGGenericTypeVar)ExprExprTr   )boundc                      e Zd ZddZddZy)ExprCatNamespacec                    || _         y N)_expr)selfexprs     K/var/www/html/jupyter_env/lib/python3.12/site-packages/narwhals/expr_cat.py__init__zExprCatNamespace.__init__   s	    
    c                @      j                   j                   fd      S )u  Get unique categories from column.

        Examples:
            >>> import polars as pl
            >>> import narwhals as nw
            >>> df_native = pl.DataFrame(
            ...     {"fruits": ["apple", "mango", "mango"]},
            ...     schema={"fruits": pl.Categorical},
            ... )
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("fruits").cat.get_categories()).to_native()
            shape: (2, 1)
            ┌────────┐
            │ fruits │
            │ ---    │
            │ str    │
            ╞════════╡
            │ apple  │
            │ mango  │
            └────────┘
        c                j    j                   j                  |       j                  j                         S r   )r   _to_compliant_exprcatget_categories)plxr   s    r   <lambda>z1ExprCatNamespace.get_categories.<locals>.<lambda>&   s%    

55c:>>MMO r   )r   _with_elementwise)r   s   `r   r   zExprCatNamespace.get_categories   s    , zz++O
 	
r   N)r   r   returnNone)r   r   )__name__
__module____qualname__r   r    r   r   r   r      s    
r   r   N)

__future__r   typingr   r   r   narwhals.exprr   r   r   r!   r   r   <module>r%      s0    " 2 2"v&
wu~ 
r   