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"], }) corrected = df.copy() corrected.loc[corrected["drop_id"].eq(102), "kg"] = 9. print(corrected["kg"].tolist()) print(df["kg"].tolist())