Potential fix. (#427)

I have looked up the error and found an potential fix.
I could not reproduce the error afterwords so it should work.
This commit is contained in:
Philipp Horstenkamp 2023-11-30 17:22:31 +01:00 committed by GitHub
parent 9c60d01985
commit 5969929f79
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -59,7 +59,9 @@ def update_table(
"""_summary_."""
table_df = metrics.sort_values(metric_dropdown_value, ascending=False).head(10)
table_df = table_df[["designation", "category", metric_dropdown_value]]
table_df[metric_dropdown_value] = table_df[metric_dropdown_value].round(6)
table_df[metric_dropdown_value] = (
table_df[metric_dropdown_value].astype(float).round(6)
)
columns = [{"name": i, "id": i} for i in table_df.columns]
return table_df.to_dict("records"), columns # type: ignore