restructure

This commit is contained in:
2022-05-27 20:39:35 +02:00
parent 8dbaea5fa5
commit 528f1bc58b
3 changed files with 9 additions and 15 deletions

View File

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

View File

@ -1,4 +0,0 @@
from .utils import *

View File

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