From 528f1bc58b02d351b3105312ef38b8cdf804220d Mon Sep 17 00:00:00 2001 From: Sven Augustin Date: Fri, 27 May 2022 20:39:35 +0200 Subject: [PATCH] restructure --- aggrid.py | 11 +++++++++-- utils/__init__.py | 4 ---- utils/utils.py | 9 --------- 3 files changed, 9 insertions(+), 15 deletions(-) delete mode 100644 utils/utils.py diff --git a/aggrid.py b/aggrid.py index 761f47e..aeaef0e 100644 --- a/aggrid.py +++ b/aggrid.py @@ -1,7 +1,5 @@ from st_aggrid import AgGrid, GridOptionsBuilder -from utils import make_key - def aggrid(df, reload_data=False): df = df[::-1] # display in reversed chronological order @@ -34,3 +32,12 @@ def aggrid(df, reload_data=False): +def make_key(df): + """ + encode the dataframe's column names into a key, + this triggers a hard reload (like F5) of the AgGrid if the columns change + """ + return "stand:" + "+".join(str(col) for col in df.columns) + + + diff --git a/utils/__init__.py b/utils/__init__.py index 30ce09d..e69de29 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -1,4 +0,0 @@ - -from .utils import * - - diff --git a/utils/utils.py b/utils/utils.py deleted file mode 100644 index a95a151..0000000 --- a/utils/utils.py +++ /dev/null @@ -1,9 +0,0 @@ - -def make_key(df): - """ - encode the dataframe's column names into a key, - this triggers a hard reload (like F5) of the AgGrid if the columns change - """ - return "stand:" + "+".join(str(col) for col in df.columns) - -