[ad_1]
I have a data frame that looks something like this:
product version count_before count_after
AdM 0 770422.0 449396.0
AdM 2 732007.0 57480.0
AdM 5 NaN 477056.0
AdM 1 1071.0 309.0
AllT 0 14.0 NaN
... ... ... ...
Zam 1 973.0 415.0
Zam 0 6682982.0 465034.0
leg 0 12741.0 5573.0
leg 2 12031.0 918.0
leg 5 NaN 8794.0
Shape (105, 3)
I would like to plot for each company a grouped barplot that shows the count_before and count_after if that is possible. I’ve tried plotting directly from a dataframe or using matplotlib but I couldn’t make the plot easy to read.
Now, I’m thinking of plotting each product separately in subplots so that in each subplot I have essentially have the same product plotting twice, once with count_before with version 0,1,2,5 and with count_after with the same.
As an example I managed to create a lineplot in subplots a while ago for each product using some other metric
I’d like to create something similar but using a barplot.
So far I have tried using seaborn to plot it but couldn’t manage it.
I’ve also tried creating a pivot table out of the dataset so I ended up having a df pivoted with count_before then one with count_after.
version 0 1 2
publisher
AdM 770422.0 1071.0 732007.0
All 14.0 0.0 14.0
.........................
Any ideas on how I could achieve this?
[ad_2]