df.reset_index(drop=True) effectively replaces the index by the default RangeIndex. Another way to do the same thing is to straight away assign a new index using set_axis() (which I believe is what OP attempted with reindex). So the following two return the same output:
df1 = df.set_axis(range(len(df)))
df2 = df.reset_index(drop=True)
Note that most method/functions in pandas that remove/modify rows such as drop_duplicates(), sort_values(), dropna(), pd.concat() etc. have ignore_index parameter, which when passed True resets the index into a RangeIndex in a single function call. So keep an eye out for this parameter if you were removing/adding rows to a dataframe. An example:
df.dropna().reset_index(drop=True) # <--- instead of this
df.dropna(ignore_index=True) # <--- use this
In this way, you can use inplace parameter as well.
df1 = df.dropna().reset_index(drop=True) # <--- must assign to dataframe
df.dropna(ignore_index=True, inplace=True) # <--- `df` modified in-place
If you used groupby and want to replace the index into the default RangeIndex, there is the as_index parameter when passed False resets the index into RangeIndex in the same function call. So instead of df.groupby('col1').mean().reset_index(), use df.groupby('col1', as_index=False).mean().