Replicate the app from the image.
Drop files here
or click to upload
import streamlit as st
import pandas as pd
from st_aggrid import AgGrid, GridOptionsBuilder
# Create sample data
data = pd.DataFrame({
'Column 1': [10, 20, 30, 40, 50],
'Column 2': [15, 25, 35, 45, 55],
'Column 3': [5, 15, 25, 35, 45],
'Column 4': [8, 18, 28, 38, 48],
'Column 5': [12, 22, 32, 42, 52]
})
# Configure the grid
gb = GridOptionsBuilder.from_dataframe(data)
gb.configure_default_column(editable=True)
grid_options = gb.build()
# Display metrics at the top
col1, col2, col3 = st.columns(3)
with col1:
st.metric("Total", "10%", "2%")
with col2:
st.metric("Average", "50%", "-1%")
with col3:
st.metric("Value", "0", "0%")
# Add a horizontal line
st.markdown("---")
# Display the grid
AgGrid(
data,
gridOptions=grid_options,
height=300,
fit_columns_on_grid_load=True
)
Hi! I can help you with any questions about Streamlit and Python. What would you like to know?