If reset_index() is not an option, reassign a new index using range():
df.index = range(len(df))
This manually overwrites the index, effectively mimicking a pandas dataframe reset index operation.
If reset_index() is not an option, reassign a new index using range():
df.index = range(len(df))
This manually overwrites the index, effectively mimicking a pandas dataframe reset index operation.