The pivot table has 4 age categories as the index and two columns containing count of males for each category and count of females for that category
Steps to reproduce
st.header('Age Category Per Gender') ageCatPerGenderTable = df.assign(count=1).pivot_table(index='Age Category', columns = 'Gender', values='count', aggfunc='sum', fill_value=0) st.dataframe(ageCatPerGenderTable)
I would like to represent pivot table as four pie charts, one for each age category with the breakdown of genders for each with a percentage and count as labels.
I’m a beginner with streamlit, python and matplotlib.