Add number of further districts
This commit is contained in:
parent
3953d6d2ff
commit
14e314822d
11
wsgi.py
11
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(
|
||||
[
|
||||
" <tr>",
|
||||
" <td>Weitere Bezirke</td>",
|
||||
]
|
||||
tfoot.append(" <tr>")
|
||||
tfoot.append(
|
||||
f" <td>Weitere Bezirke ({num_missing})</td>"
|
||||
if num_missing
|
||||
else f" <td>Weitere Bezirke</td>"
|
||||
)
|
||||
for i in range(len(df.columns) - 2):
|
||||
tfoot.append(" <td></td>")
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user