Added rounding on Metric table to 6 digits to limit the noise (#386)

Currently to many digits are shown in the Metrics table. Rounding to 6
digits should be a bit better.
This commit is contained in:
Philipp Horstenkamp 2023-11-14 17:49:48 +01:00 committed by GitHub
parent 119a3edfca
commit 4e63c6e907
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -56,6 +56,7 @@ 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)
columns = [{"name": i, "id": i} for i in table_df.columns]
return table_df.to_dict("records"), columns # type: ignore