diff --git a/wsgi.py b/wsgi.py index 6676358..fc9a356 100644 --- a/wsgi.py +++ b/wsgi.py @@ -291,6 +291,7 @@ def _print_as_html( dropna: bool = True, ) -> list[str]: df = df.astype({"Digitale Befragung": "Int32"}) + num_missing = (df[df.isna().any(axis=1)]["Landesbezirk"] != "Hessen").sum() if dropna: df = df.dropna() with pd.option_context("display.max_rows", None): @@ -315,11 +316,11 @@ def _print_as_html( ] ) if total and (diff := total - df["Digitale Befragung"].sum()): - tfoot.extend( - [ - " ", - " Weitere Bezirke", - ] + tfoot.append(" ") + tfoot.append( + f" Weitere Bezirke ({num_missing})" + if num_missing + else f" Weitere Bezirke" ) for i in range(len(df.columns) - 2): tfoot.append(" ")