From 327d7b7ef4e9b04f51ae384ba7f1c195c8fa8f84 Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Wed, 3 Jun 2026 12:40:57 +0200 Subject: [PATCH] added set_data to lib --- stand/adb.py | 5 +++++ stand/table.py | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/stand/adb.py b/stand/adb.py index 342a1a8..5819bee 100644 --- a/stand/adb.py +++ b/stand/adb.py @@ -41,6 +41,11 @@ class ArcticLibrary: return df + def set_data(self, symbol, df): + df.index = df.index.view("datetime64[ns]") # adb supports update only for timeseries indexes + self.lib.update(symbol, df) + + def has_index(self, symbol, index): index = encode_index(index) diff --git a/stand/table.py b/stand/table.py index d9d0828..b6b1589 100644 --- a/stand/table.py +++ b/stand/table.py @@ -85,11 +85,11 @@ def update_adb(evt): col_id = evt.args["colId"] new_val = evt.args["newValue"] - index = pd.Timestamp(int(row_id)) # adb supports update only for timeseries indexes + index = int(row_id) lib = adb.get(beamline) - df = lib.read(pgroup, date_range=[index]).data + df = lib.get_data(pgroup, index) df.at[index, col_id] = new_val - lib.update(pgroup, df) + lib.set_data(pgroup, df) def update_grids(evt):