The idea here is to reset index such that they are all integers from 0 to N.
Two possible approaches:
To not modify the original df but assign the result to a new variable
df_new = df.reset_index(drop=True)
To do it in place
df.reset_index(drop=True, inplace=True)
df.index = np.arange(len(df))
Sample code: https://github.com/KamarajuKusumanchi/notebooks/blob/master/pandas/reindex%20from%200%20to%20N.ipynb
tags | reindex from 0 to N, range, uses np.arange
set index from 0 to N