import pandas as pd import numpy as np df = pd.DataFrame({ "drop_id": [101, 102, 103, 104], "point": ["north", "south", "north", "south"], "material": ["leaves", "food", "food", "leaves"], "kg": [12., 8., 6., 10.], "bags": pd.array([3, 2, 1, 2], dtype="Int64"), "day": ["2026-10-01", "2026-10-01", "2026-10-02", "2026-10-02"], }) table = df.set_index("drop_id") print(table.loc[[101, 103], "kg"].tolist()) print(table.loc[101:102, "kg"].tolist()) print(float(table.at[104, "kg"]))