I have datafrme on which I perform groupby on two columns:
ax = df_all.groupby(['Component', 'SubComponent' ])['SubComponent'].count()
And this give me this:
--------------------------------------------------
| Component | SubComponent| |
--------------------------------------------------
|A |First | 1|
--------------------------------------------------
| |Second | 10|
--------------------------------------------------
| |Third | 6|
--------------------------------------------------
|B |First | 8|
--------------------------------------------------
| |Second | 5|
--------------------------------------------------
| |Third | 17|
--------------------------------------------------
Now I would like to make a histogram out of it. Each bar would be Component and each component would divided on SubComponents showing number of occurrence of each SubComponent with different color.
Is there easy way to accomplish it with matplotlib.pyploy ?
Thanks, Submi