I have a pandas dataframe as below :
I want to get display the grand total in streamlit metrics UI. How do i get sum/average of all the percentage values
I tried below code:
<code>#compute top analytics
total_investment = df['Investment']
total1,total2,total3,total4,total5=st.columns(5,gap='small')
with total1:
st.info('Sum Investment',icon="????")
st.metric(label="Sum TZS",value=f"{total_investment}")
</code>
<code>#compute top analytics
total_investment = df['Investment']
total1,total2,total3,total4,total5=st.columns(5,gap='small')
with total1:
st.info('Sum Investment',icon="????")
st.metric(label="Sum TZS",value=f"{total_investment}")
</code>
#compute top analytics
total_investment = df['Investment']
total1,total2,total3,total4,total5=st.columns(5,gap='small')
with total1:
st.info('Sum Investment',icon="????")
st.metric(label="Sum TZS",value=f"{total_investment}")
below is the result i get