Run ❯
×
Change Orientation
Change Theme, Dark/Light
Go to Spaces
import pandas as pd data = [[50, True], [40, False], [30, False]] label_rows = ["Sally", "Mary", "John"] label_cols = ["age", "qualified"] df = pd.DataFrame(data, label_rows, label_cols) print(df.loc["Mary", "age"])
40