§
    }ÀûiÎ  ã                  óŒ   — d dl mZ d dlmZ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ÚCallableÚGenericÚTypeVar)ÚExprKindÚExprNode)ÚExprÚExprTr
   )Úboundc                  óF   — e Zd Zdd„Zdd„Zdd	„Zdd„Zdd„Zdd„Zdd„Z	dS )ÚExprNameNamespaceÚexprr   ÚreturnÚNonec                ó   — || _         d S )N)Ú_expr)Úselfr   s     úF/home/jrussi/.local/lib/python3.11/site-packages/narwhals/expr_name.pyÚ__init__zExprNameNamespace.__init__   s   € ØˆŒ
ˆ
ˆ
ó    c                óf   — | j                              t          t          j        d¦  «        ¦  «        S )aö  Keep the original root name of the expression.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import pandas as pd
            >>> import narwhals as nw
            >>> df_native = pd.DataFrame({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("foo").alias("alias_for_foo").name.keep()).columns
            ['foo']
        z	name.keep©r   Ú_append_noder	   r   ÚELEMENTWISE©r   s    r   ÚkeepzExprNameNamespace.keep   s'   € ð Œz×&Ò&¥xµÔ0DÀkÑ'RÔ'RÑSÔSÐSr   ÚfunctionúCallable[[str], str]c                ój   — | j                              t          t          j        d|¬¦  «        ¦  «        S )a¸  Rename the output of an expression by mapping a function over the root name.

        Arguments:
            function: Function that maps a root name to a new name.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import pandas as pd
            >>> import narwhals as nw
            >>> df_native = pd.DataFrame({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> renaming_func = lambda s: s[::-1]  # reverse column name
            >>> df.select(nw.col("foo", "BAR").name.map(renaming_func)).columns
            ['oof', 'RAB']
        zname.map)r   r   )r   r   s     r   ÚmapzExprNameNamespace.map!   s3   € ð$ Œz×&Ò&Ý•XÔ)¨:ÀÐIÑIÔIñ
ô 
ð 	
r   ÚprefixÚstrc                ój   — | j                              t          t          j        d|¬¦  «        ¦  «        S )aj  Add a prefix to the root column name of the expression.

        Arguments:
            prefix: Prefix to add to the root column name.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import polars as pl
            >>> import narwhals as nw
            >>> df_native = pl.DataFrame({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("foo", "BAR").name.prefix("with_prefix")).columns
            ['with_prefixfoo', 'with_prefixBAR']
        zname.prefix)r"   r   )r   r"   s     r   r"   zExprNameNamespace.prefix7   ó3   € ð" Œz×&Ò&Ý•XÔ)¨=ÀÐHÑHÔHñ
ô 
ð 	
r   Úsuffixc                ój   — | j                              t          t          j        d|¬¦  «        ¦  «        S )am  Add a suffix to the root column name of the expression.

        Arguments:
            suffix: Suffix to add to the root column name.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import polars as pl
            >>> import narwhals as nw
            >>> df_native = pl.DataFrame({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("foo", "BAR").name.suffix("_with_suffix")).columns
            ['foo_with_suffix', 'BAR_with_suffix']
        zname.suffix)r&   r   )r   r&   s     r   r&   zExprNameNamespace.suffixL   r%   r   c                óf   — | j                              t          t          j        d¦  «        ¦  «        S )aè  Make the root column name lowercase.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import pyarrow as pa
            >>> import narwhals as nw
            >>> df_native = pa.table({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("foo", "BAR").name.to_lowercase()).columns
            ['foo', 'bar']
        zname.to_lowercaser   r   s    r   Úto_lowercasezExprNameNamespace.to_lowercasea   ó/   € ð Œz×&Ò&Ý•XÔ)Ð+>Ñ?Ô?ñ
ô 
ð 	
r   c                óf   — | j                              t          t          j        d¦  «        ¦  «        S )aè  Make the root column name uppercase.

        Notes:
            For Polars versions prior to 1.32, this will undo any previous renaming operations on the expression.

        Examples:
            >>> import pyarrow as pa
            >>> import narwhals as nw
            >>> df_native = pa.table({"foo": [1, 2], "BAR": [4, 5]})
            >>> df = nw.from_native(df_native)
            >>> df.select(nw.col("foo", "BAR").name.to_uppercase()).columns
            ['FOO', 'BAR']
        zname.to_uppercaser   r   s    r   Úto_uppercasezExprNameNamespace.to_uppercases   r*   r   N)r   r   r   r   )r   r   )r   r   r   r   )r"   r#   r   r   )r&   r#   r   r   )
Ú__name__Ú
__module__Ú__qualname__r   r   r!   r"   r&   r)   r,   © r   r   r   r      s¤   € € € € € ðð ð ð ðTð Tð Tð Tð 
ð 
ð 
ð 
ð,
ð 
ð 
ð 
ð*
ð 
ð 
ð 
ð*
ð 
ð 
ð 
ð$
ð 
ð 
ð 
ð 
ð 
r   r   N)Ú
__future__r   Útypingr   r   r   r   Únarwhals._expression_parsingr   r	   Únarwhals.exprr
   r   r   r0   r   r   ú<module>r5      sÃ   ðØ "Ð "Ð "Ð "Ð "Ð "à <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <Ð <à ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;Ð ;àð #Ø"Ð"Ð"Ð"Ð"Ð"àˆ˜vÐ&Ñ&Ô&€ðv
ð v
ð v
ð v
ð v
˜ œñ v
ô v
ð v
ð v
ð v
r   