polars.Series.rename#

Series.rename(
name: str,
*,
in_place: bool | None = None,
) Series[source]#

Rename this Series.

Parameters:
name

New name.

in_place

Modify the Series in-place.

Examples

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