Skip to content

Commit

Permalink
changing default sigfigs in app to 2 (#74)
Browse files Browse the repository at this point in the history
* changing default sigfigs

* ngm table has sigdigs
  • Loading branch information
paigemiller authored Jan 15, 2025
1 parent f958f9b commit 3b07f61
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions ngm/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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.",
)
Expand Down

0 comments on commit 3b07f61

Please sign in to comment.