
    Lpj                        S SK Jr  S SKJrJrJr  S SKJrJr  \(       a  S SK	J
r
  S SKJr  \" SSS9r " S	 S
\\   5      rg)    )annotations)TYPE_CHECKINGGenericTypeVar)ExprKindExprNode)Callable)ExprExprTr
   )boundc                  Z    \ rS rSrSS jrSS jrSS jrSS jrSS jrSS jr	SS jr
S	rg
)ExprNameNamespace   c                    Xl         g )N_expr)selfexprs     N/var/www/html/pdf-tiff/venv/lib/python3.13/site-packages/narwhals/expr_name.py__init__ExprNameNamespace.__init__   s    
    c                h    U R                   R                  [        [        R                  S5      5      $ )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   keepExprNameNamespace.keep   s&     zz&&x0D0Dk'RSSr   c                f    U R                   R                  [        [        R                  SUS95      $ )aP  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)functionr   )r   r!   s     r   mapExprNameNamespace.map#   s-    $ zz&&X)):I
 	
r   c                f    U R                   R                  [        [        R                  SUS95      $ )a
  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)prefixr   )r   r%   s     r   r%   ExprNameNamespace.prefix9   -    " zz&&X))=H
 	
r   c                f    U R                   R                  [        [        R                  SUS95      $ )a  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)suffixr   )r   r)   s     r   r)   ExprNameNamespace.suffixN   r'   r   c                h    U R                   R                  [        [        R                  S5      5      $ )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_lowercaseExprNameNamespace.to_lowercasec   ,     zz&&X))+>?
 	
r   c                h    U R                   R                  [        [        R                  S5      5      $ )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_uppercaseExprNameNamespace.to_uppercaseu   r.   r   r   N)r   r   returnNone)r2   r   )r!   zCallable[[str], str]r2   r   )r%   strr2   r   )r)   r4   r2   r   )__name__
__module____qualname____firstlineno__r   r   r"   r%   r)   r,   r0   __static_attributes__ r   r   r   r      s&    T 
,
*
*
$
r   r   N)
__future__r   typingr   r   r   narwhals._expression_parsingr   r   collections.abcr	   narwhals.exprr
   r   r   r:   r   r   <module>r@      s8    " 2 2 ;("v&v
 v
r   