streamlit-component-gallery / pages /layout.columns2.py
whitphx's picture
whitphx HF staff
Copy https://github.com/whitphx/stlite/tree/main/packages/sharing-editor/public/samples/011_component_gallery
dd0ef30
raw history blame
No virus
318 Bytes
import streamlit as st
import numpy as np
@st.experimental_memo
def load_data():
data = np.random.randn(10, 1)
return data
col1, col2 = st.columns([3, 1])
data = load_data()
col1.subheader("A wide column with a chart")
col1.line_chart(data)
col2.subheader("A narrow column with the data")
col2.write(data)