reset index series pandas code example
Example 1: reset_index pandas
df.reset_index(drop=True, inplace=True)
Example 2: numpy series reset index
>>> s.reset_index(inplace=True, drop=True)
>>> s
0 1
1 2
2 3
3 4
Name: foo, dtype: int64
Example 3: reset index pandas
df.reset_index(drop=True)
Example 4: pandas reset index start from 0
gapminder_ocean.reset_index(drop=True, inplace=True)