
    }i                        d dl mZ d dlmZmZmZ d dlmZ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)ExprKindExprNode)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     E/home/jrussi/.local/lib/python3.11/site-packages/narwhals/expr_cat.py__init__zExprCatNamespace.__init__   s    


    c                f    | j                             t          t          j        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  │
            └────────┘
        zcat.get_categories)r   _append_noder   r   
FILTRATION)r   s    r   get_categorieszExprCatNamespace.get_categories   s/    , z&&X(*>??
 
 	
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._expression_parsingr   r   narwhals.exprr	   r
   r   r   r   r   <module>r#      s    " " " " " " 2 2 2 2 2 2 2 2 2 2 ; ; ; ; ; ; ; ; #""""""v&&&
 
 
 
 
wu~ 
 
 
 
 
r   