From 3b07f611e8f23201da554642aef23db480e7b9f7 Mon Sep 17 00:00:00 2001 From: Paige Miller Date: Wed, 15 Jan 2025 13:08:29 -0600 Subject: [PATCH] changing default sigfigs in app to 2 (#74) * changing default sigfigs * ngm table has sigdigs --- ngm/app.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/ngm/app.py b/ngm/app.py index 272e76c..d9a6caf 100644 --- a/ngm/app.py +++ b/ngm/app.py @@ -152,6 +152,9 @@ def summarize_scenario( .with_columns(pl.Series("", [f"to {grp}" for grp in params["group_names"]])) .select(["", *[f"from {grp}" for grp in params["group_names"]]]) ) + ngm_df = ngm_df.with_columns( + [pl.col(col).round_sig_figs(sigdigs) for col in ngm_df.columns[1:]] + ) c.dataframe(ngm_df) c.write(ngm_help) @@ -287,8 +290,8 @@ def app(): sigdigs = st.slider( "Displayed significant figures", 1, - 4, - value=3, + 3, + value=2, step=1, help="Values are reported only to this many significant figures.", )