So I am a newbie learning about data visualization in pandas (python) , My task is to Create a stacked chart of median WeekHrs and CodeRevHrs for the age group 30 to 35.
following is my code where I extracted the data applying filter on age column and below are the first five rows of my dataset
age_filter= agework [(agework["age"]>= 30 )&(agework["age"]<=35)]
median_weekhrs= age_filter["Weekhrs"].median()
median_coderev= age_filter["CodeRevHrs"].median()
age_filter.head()
CodeRevHrs Weekhrs age
5 3.0 8.0 31.0
11 2.0 40.0 34.0
12 2.0 40.0 32.0
18 15.0 42.0 34.0
22 2.0 40.0 33.0
How can I plot a stacked bar chart with a median?
Please help