polars.Series.rename#

Series.rename(name: str) Series[source]#

Rename this Series.

Alias for Series.alias().

Parameters:
name

New name.

Examples

>>> s = pl.Series("a", [1, 2, 3])
>>> s.rename("b")
shape: (3,)
Series: 'b' [i64]
[
        1
        2
        3
]