I am working on looking at how age and time at a company influences resignation due to dissatisfaction.
I have a dataframe ("combined_updated") that has these columns:
"age_updated", "service_cat", and "dissatisfied."
"age_updated" and "service_cat" are strings. "age_updated" includes age ranges, and "service_cat" is a string which described the career stage of the employee (i.e. "New", "Experienced", etc.).
"dissatisfied" is boolean with True working as 1 and False as 0 in a pivot table. The pivot table therefore shows the % dissatisfied in certain groups.
I would like to make four bar graphs within a subplot with one graph looking at each career stage, with the y axis as % dissatisfied and the x axis as age.
So far I have written code that puts it all on one graph:
dis_pt = combined_updated.pivot_table(index=“service_cat”,columns=“age_cleaned”,values=“dissatisfied”)
dis_pt.plot(kind=“bar”)
Does anyone know how to break this apart into subplots with appropriate labeling? Thanks!