Skip to content

Undo any renaming operation

Source code

Description

This removes any renaming operation like $alias() or $name$keep(). Polars uses the "leftmost rule" to determine naming, meaning that the first element of the expression will be used to name the output.

Usage

<Expr>$meta$undo_aliases()

Value

Expr with aliases undone

Examples

library(polars)

e = (pl$col("alice") + pl$col("eve"))$alias("bob")
e$meta$output_name()
#> [1] "bob"
e$meta$undo_aliases()$meta$output_name()
#> [1] "alice"