st.write renders supplied content in a Streamlit application. It acts as a flexible display function: pass a string, dictionary, pandas dataframe, class, or function, and Streamlit presents it in a sensible format. section 6.2.2
For a dashboard, use st.write(data.head(5)) to display the first five dataframe rows. This gives immediate visual feedback that CSV loading worked before building further UI. section 6.2.2
Prompting for missing input
A password checker uses st.write("Please enter a password.") when the user presses the check button without entering a password. For success and failure states, use the more semantically styled st.success and st.error elements. section 2.5.3
Listing 6.2 Using st.write
import streamlit as st
from data_loader import load_data
data = load_data()
st.write(data.head(5))
Use this minimal listing to connect data loading with a visible dataframe preview. section 6.2.2
