How update and overwrite dataframes, charts, texts etc. without to create additional ones?

Hi everyone,

i want to display realtime updates of charts, dataframes or what ever in an infinity loop or recursive function. The point is that i don’t want to create or display new objects. I want just to display always the same overwrited object.
e.g. the following functions creates a series of strings and doesn’t update itself.

i = 0
for i in range (0, 10):
st.write(i)
i+=1

Thank you very much :slight_smile:

You can use st.empty to constantly overwrite the same object:

https://docs.streamlit.io/en/stable/api.html?highlight=empty#streamlit.empty

Best,
Randy