Placeholders, help, and options
There are a handful of methods that allow you to create placeholders in your app, provide help using doc strings, get and modify configuration options and query parameters.
Set page title, favicon, and more
Configures the default settings of the page.
st.set_page_config(
title="My app",
favicon=":shark:",
)
Echo
Display some code on the app, then execute it. Useful for tutorials.
with st.echo():
st.write('This code will be printed')
Get help
Display object’s doc string, nicely formatted.
st.help(st.write)
st.help(pd.DataFrame)
st.experimental_show
Write arguments and argument names to your app for debugging purposes.
df = pd.DataFrame({
'first column': [1, 2, 3, 4],
'second column': [10, 20, 30, 40],
})
st.experimental_show(df)
Get query parameters
Return the query parameters that are currently showing in the browser's URL bar.
st.experimental_get_query_params()
Set query parameters
Set the query parameters that are shown in the browser's URL bar.
st.experimental_set_query_params(
show_map=True,
selected=["asia"]
)