When I read in a CSV, I can say pd.read_csv(\'my.csv\', index_col=3) and it sets the third column as index.
pd.read_csv(\'my.csv\', index_col=3)
How can I do the same if I have a pandas datafra
Maybe try set_index()?
df = df.set_index([2])