Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggest for the st.empty documentation #458

Open
lde2015 opened this issue Aug 14, 2022 · 0 comments
Open

Suggest for the st.empty documentation #458

lde2015 opened this issue Aug 14, 2022 · 0 comments
Assignees
Labels
docs enhancement New feature or request

Comments

@lde2015
Copy link

lde2015 commented Aug 14, 2022

Link to doc page in question (if any):
https://docs.streamlit.io/library/api-reference/layout/st.empty

Name of the Streamlit feature whose docs need improvement:

What you think the docs should say:
>>>
>>> # Replace the placeholder with some text:
>>> placeholder.text("Hello")
>>> time.sleep(5)
>>>
>>> # Replace the text with a chart:
>>> placeholder.line_chart({"data": [1, 5, 2, 6]})
>>> time.sleep(5)
>>>
>>> # Replace the chart with several elements:
>>> with placeholder.container():
... st.write("This is one element")
... st.write("This is another")
...
>>> time.sleep(5)
>>>
>>> # Clear all those elements:
>>> placeholder.empty()
>>> time.sleep(0.01)
>>>
>>> # Replace the chart again:
>>> with placeholder.container():
>>> st.write("===> This is another one !!!")

@snehankekre snehankekre transferred this issue from streamlit/streamlit Aug 15, 2022
@sfc-gh-dmatthews sfc-gh-dmatthews self-assigned this Jan 18, 2024
@sfc-gh-dmatthews sfc-gh-dmatthews added enhancement New feature or request and removed needs triage labels Jan 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants