import pandas as pd
df = pd.DataFrame(
[['Tom', 91, 80, 94],
['Emmy', 98, 95, 96],
['Rubeus', 87, 81, 87],
['Dumbledore', 99, 100, 98],
['Axel', 75, 85, 90]],
columns=['name', 'algebra', 'python', 'java'])
df = df.set_index('python')
print(df)
'''
run:
name algebra java
python
80 Tom 91 94
95 Emmy 98 96
81 Rubeus 87 87
100 Dumbledore 99 98
85 Axel 75 90
'''