diff --git a/stand/api.py b/stand/api.py index 11c6b21..badde71 100644 --- a/stand/api.py +++ b/stand/api.py @@ -44,15 +44,15 @@ def append_run(beamline: Beamline, pgroup: PGroup, run: int, entries: dict[str, timestamp = entries.pop("timestamp", None) timestamp = datetime.fromisoformat(timestamp) if timestamp else datetime.now() - row = {"timestamp": timestamp, **entries} # setdefault would not force timestamp to be the first column + entries = {"timestamp": timestamp, **entries} # setdefault would not force timestamp to be the first column - df = pd.DataFrame(row, index=[run]) + df = pd.DataFrame(entries, index=[run]) lib.append_data(pgroup, df) - row = {"run": run, **row} # setdefault would not force run to be the first column + entries = {"run": run, **entries} # setdefault would not force run to be the first column for grid in grids[pgroup]: - grid.append(row) + grid.append(entries)