Run ❯
Get your
own Python
server
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import pandas as pd data = { "name": ["Bill", "Bob", "Betty"], "age": [50, 50, 30], "qualified": [True, False, False] } df = pd.DataFrame(data).set_index(["name", "age"]) newdf = df.droplevel(0) print(newdf)
qualified age 50 True 50 False 30 False