reset_index pandas to numpy code example
Example 1: 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 2: reset index pandas
df.reset_index(drop=True)
>>> s.reset_index(inplace=True, drop=True)
>>> s
0 1
1 2
2 3
3 4
Name: foo, dtype: int64
df.reset_index(drop=True)