plot bar chart for multiple categorical values with groupby

Viewed 29

I'm working on this dataset and I've this code which I want to plot

df2.groupby(by = ['Age', 'LearnCode']).size()
Age                 LearnCode                                      
18-24 years old     Books / Physical media                              7997
                    Coding Bootcamp                                     2549
                    Colleague                                           2904
                    Friend or family member                             3674
                    Online Courses or Certification                     9814
                    Online Forum                                        7240
                    Other (please specify):                             1205
                    Other online resources (ex: videos, blogs, etc)    14639
                    School                                             11765
25-34 years old     Books / Physical media                             15818
                    Coding Bootcamp                                     3553
                    Colleague                                           6727
                    Friend or family member                             5470
                    Online Courses or Certification                    13915
                    Online Forum                                       10838
                    Other (please specify):                             2272
                    Other online resources (ex: videos, blogs, etc)    19803
                    School                                             18478
dtype: int64

I want to plot a bar plot between each LearnCode category and their count for the all Age categories, can anyone elaborate on how to do such thing?

0 Answers
Related