How to reset index in a pandas dataframe? [duplicate]

DataFrame.reset_index is what you’re looking for. If you don’t want it saved as a column, then do:

df = df.reset_index(drop=True)

If you don’t want to reassign:

df.reset_index(drop=True, inplace=True)

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)