There are 4 ways that Streamlit has to display data.
Metric
If you have just a single number to show as a key metric, do so using the st.metric()
method. There is a delta
option to show whether the metric is an increase or a decrease.
To display a decrease, use a negative value for delta, which will be displayed in red. An increase will be displayed in green.
Create a free account to access the full course.
By signing up, you agree to Educative's Terms of Service and Privacy Policy