Series.
rename
Alter Series name.
Scalar will alter the Series.name attribute.
Series.name
Whether to return a new Series. If True then value of copy is ignored.
Series with name altered.
Examples
>>> s = ps.Series([1, 2, 3]) >>> s 0 1 1 2 2 3 dtype: int64
>>> s.rename("my_name") # scalar, changes Series.name 0 1 1 2 2 3 Name: my_name, dtype: int64