From 4e63c6e907d6fa4156ca85a021041247613ecbbe Mon Sep 17 00:00:00 2001 From: Philipp Horstenkamp Date: Tue, 14 Nov 2023 17:49:48 +0100 Subject: [PATCH] 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. --- src/aki_prj23_transparenzregister/ui/pages/home.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/aki_prj23_transparenzregister/ui/pages/home.py b/src/aki_prj23_transparenzregister/ui/pages/home.py index 93d5400..dd7e67d 100644 --- a/src/aki_prj23_transparenzregister/ui/pages/home.py +++ b/src/aki_prj23_transparenzregister/ui/pages/home.py @@ -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