https://dataindependent.com/pandas/pa...
Sometimes your row numbers as your index just doesn't cut it and you need to pandas set index on your DataFrame.
You may want to replace your current index with another column in your DataFrame. No problem with pd.DataFrame.set_index()!
You're usually doing this when you want to set your index to a list of names, or unique ids. For example, you imported a CSV but forgot to set your index_col.