Skip to content

Rename a series

Source code

Description

Rename a series

Usage

<Series>$rename(name, in_place = FALSE)

Arguments

name New name.
in_place Rename in-place, which breaks immutability. If TRUE, you need to run options(polars.strictly_immutable = FALSE) before, otherwise it will throw an error.

Value

Series

Examples

library("polars")

as_polars_series(1:4, "bob")$rename("alice")
#> polars Series: shape: (4,)
#> Series: 'alice' [i32]
#> [
#>  1
#>  2
#>  3
#>  4
#> ]