If no dataframe was yet created for the current day remove the entry for plotting purposes

This commit is contained in:
Felix Blanke 2023-08-28 00:12:01 +02:00
parent 598a22ad87
commit 4e43916fb1

View File

@ -83,6 +83,9 @@ def plot(
sum_val = current_df[["Digitale Befragung"]].sum().iloc[0] sum_val = current_df[["Digitale Befragung"]].sum().iloc[0]
df.loc[curr_datetime] = sum_val df.loc[curr_datetime] = sum_val
if pd.isna(df.loc[df.index.max()][0]):
df = df.drop([df.index.max()])
fig = plt.figure(dpi=300) fig = plt.figure(dpi=300)
# fill weekends # fill weekends