reset index

df.reset_index(drop=True)

Here is what the above code is Doing:
1. We’re creating a new dataframe called df_new.
2. We’re resetting the index of df_new to start from 0.
3. We’re dropping the old index of df_new.
4. We’re setting the index of df_new to be the ‘id’ column.
5. We’re setting the columns of df_new to be the ‘name’ and ‘age’ columns.
6. We’re resetting the index of df_new to start from 0.
7. We’re dropping the old index of df_new.