1>>> s = pd.Series([1, 2, 3])
2>>> s
30 1
41 2
52 3
6dtype: int64
7>>> s.rename("my_name") # scalar, changes Series.name
80 1
91 2
102 3
11Name: my_name, dtype: int64
12>>> s.rename(lambda x: x ** 2) # function, changes labels
130 1
141 2
154 3
16dtype: int64
17>>> s.rename({1: 3, 2: 5}) # mapping, changes labels
180 1
193 2
205 3
21dtype: int64
22