I want to implement a dashboard which displays st.metrics across three columns. The code behind the dashboard will run a model, and these three metrics are intended to provide monitoring of how the model is running.
However when initialised as:
col1, col2, col3 = st.columns(3)
and then later updated using the following command, which is executed in a while loop:
col1.metric(‘Metric Name’, variable)
Rather than the metric value being updated in the column, the whole row is repeatedly append to the bottom of the container, meaning when this runs for 100s of iterations, I get 100s of rows of my columns.
I’ve tried adding:
col1 = st.empty()
etc.
But this overrides the st.columns command above it.
Is this intended behaviour, or is there a way to use columns to get them to update rather than append?