o
    $&]i                     @  sd   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dZG dd	 d	ee Zd
S )    )annotations)TYPE_CHECKINGGenericTypeVar)ExprKindExprNode)ExprExprTr   )boundc                   @  s    e Zd Zd
ddZdddZd	S )ExprCatNamespaceexprr	   returnNonec                 C  s
   || _ d S )N)_expr)selfr    r   O/var/www/html/IGF-ODF-V3/venv/lib/python3.10/site-packages/narwhals/expr_cat.py__init__   s   
zExprCatNamespace.__init__c                 C  s   | 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   r   r   r   get_categories   s   
zExprCatNamespace.get_categoriesN)r   r	   r   r   )r   r	   )__name__
__module____qualname__r   r   r   r   r   r   r      s    
r   N)
__future__r   typingr   r   r   narwhals._expression_parsingr   r   narwhals.exprr   r	   r   r   r   r   r   <module>   s    