dear sir
I have downloaded this code from the Streamlit website, and it functions correctly; however, it currently provides only one column grouped by total. I require assistance in modifying this code to achieve three columns grouped by total. Alternatively, if you could provide a new code that supports multiple columns grouped by total, I would greatly appreciate it. Thank you in advance for your assistance.
see my code
import streamlit as st
import pandas as pd
from st_aggrid import GridOptionsBuilder, AgGrid
df = pd.DataFrame({
‘Name’: [‘Alice’,‘Alice’, ‘Bob’,‘Bob’],
‘Area’: [‘Karachi’,‘Islamabad’,‘Multan’,‘Mirput’], #need this column total also
‘Day’: [‘Monday’,‘Tuesday’,‘Monday’,‘Tuesday’],
‘Miles’: [2.1,4,1.2,4.3]
})
ob = GridOptionsBuilder.from_dataframe(df)
ob.configure_column(‘Name’, rowGroup=True)
ob.configure_column(‘Miles’, aggFunc=‘sum’)
st.markdown(‘# Pandas DataFrame’)
st.write(df)
st.markdown(‘# AgGrid’)
AgGrid(df, ob.build(), enable_enterprise_modules=True)