How to set in pandas the first column and row as index?

Solution 1:

You can try this regardless of the number of rows

df = pd.read_csv('data.csv', index_col=0)

Solution 2:

Maybe try set_index()?

df = df.set_index([2])