diff --git a/pandas/core/series.py b/pandas/core/series.py index 8d7354f5f4f0c..81cf839ad5f1c 100644 --- a/pandas/core/series.py +++ b/pandas/core/series.py @@ -5522,6 +5522,7 @@ def to_period(self, freq: str | None = None, copy: bool | None = None) -> Series Index(['Kolkata', 'Chicago', 'Toronto', 'Lisbon'], dtype='object') To change the index labels of an existing Series: + >>> city_series.index = ['KOL', 'CHI', 'TOR', 'LIS'] >>> city_series.index Index(['KOL', 'CHI', 'TOR', 'LIS'], dtype='object')