Skip to content

Commit c7375d5

Browse files
authored
DOC add example of Series.index #51842 (#52780)
Update series.py DOC add example of Series.index #51842 . A newline between the text and the code is missing.
1 parent 4fef063 commit c7375d5

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

pandas/core/series.py

+1
Original file line numberDiff line numberDiff line change
@@ -5522,6 +5522,7 @@ def to_period(self, freq: str | None = None, copy: bool | None = None) -> Series
55225522
Index(['Kolkata', 'Chicago', 'Toronto', 'Lisbon'], dtype='object')
55235523
55245524
To change the index labels of an existing Series:
5525+
55255526
>>> city_series.index = ['KOL', 'CHI', 'TOR', 'LIS']
55265527
>>> city_series.index
55275528
Index(['KOL', 'CHI', 'TOR', 'LIS'], dtype='object')

0 commit comments

Comments
 (0)