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) - -