I have a dataframe with 10,000 rows and 200 columns. For simplicity and to be brief I took the following sample of the dataframe :
df = {'Major':['Bachelor in Economics', 'Bachelor in Engineering', 'Bachelor in Finance', 'Bachelor in Biology',
'Bachelor in Economics', 'Bachelor in Engineering', 'Bachelor in Finance', 'Bachelor in Finance',
'Bachelor in Economics', 'Bachelor in Engineering','Bachelor in Finance', 'Bachelor in Biology',
'Bachelor in Biology', 'Bachelor in Information Systems', 'Bachelor in Marketing'],
'Gender':['Male', 'Female', 'Female', 'Female', 'Male', 'Female', 'Male', 'Female', 'Female', 'Male', 'Female', 'Male', 'Male', 'Female','Male']
}
df = pd.DataFrame.from_dict(df)
My question here is how can I plot a stacked bar chart based on the gender label in python. The expected result is to have a stacked bar chart based on Gender for each Major. I would really appreciate it if someone can help me how do it.