Expanders are useful for hiding code or detailed statistics to reduce clutter.
@st.cache_data def get_data(name): if name == "Iris": # Sample URL for Iris dataset url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/iris.csv" return pd.read_csv(url) elif name == "Tips": url = "https://raw.githubusercontent.com/mwaskom/seaborn-data/master/tips.csv" return pd.read_csv(url) else: # Generate random data return pd.DataFrame(np.random.randn(50, 3), columns=['A', 'B', 'C'])
https://share.streamlit.io/daniellewisdl/streamlit-cheat-sheet getting started with streamlit for data science pdf
: Setting up a development environment and creating a basic "Hello World" app.
col1, col2 = st.columns(2)
Save the file as app.py and run:
# Activate the environment # On Windows: streamlit_env\Scripts\activate Expanders are useful for hiding code or detailed
Streamlit provides simple API calls to format text.