streamlit-component-gallery / pages /data.dataframe.py
whitphx's picture
whitphx HF staff
Copy sample files from streamlit/docs/python/api-examples-source/* (4e54057)
9c1ffe9
raw
history blame contribute delete
No virus
275 Bytes
import numpy as np
import pandas as pd
import streamlit as st
@st.cache_data
def load_data():
df = pd.DataFrame(
np.random.randn(50, 20), columns=("col %d" % i for i in range(20))
)
return df
df = load_data()
st.dataframe(df) # Same as st.write(df)