Get the column name that this expression would produce
Description
It may not always be possible to determine the output name as that can
depend on the schema of the context; in that case this will raise an
error if raise_if_undetermined = TRUE
(the default), and
return NA
otherwise.
Usage
<Expr>$meta$output_name(..., raise_if_undetermined = TRUE)
Arguments
…
|
These dots are for future extensions and must be empty. |
raise_if_undetermined
|
If TRUE (default), raise an error if the output name cannot
be determined. Otherwise return NA .
|
Value
A polars expression
Examples
#> [1] "foo"
#> [1] "foo"
#> [1] "foo"
e_sum_slice <- pl$col("foo")$sum()$slice(pl$len() - 10, pl$col("bar"))
e_sum_slice$meta$output_name()
#> [1] "foo"
#> [1] "len"