这是我的熊猫数据框df
:
ab channel booked
0 control book_it 466
1 control contact_me 536
2 control instant 17
3 treatment book_it 494
4 treatment contact_me 56
5 treatment instant 22
我想绘制3组条形图(根据channel
):
对于每个渠道:情节控制预定值与治疗预定值。
因此,我应该获得3组的6个条形图,每组都有控制和治疗预定值。
到目前为止,我只能预定,但不能按AB分组:
ax = df_conv['booked'].plot(kind='bar',figsize=(15,10), fontsize=12)
ax.set_xlabel('dim_contact_channel',fontsize=12)
ax.set_ylabel('channel',fontsize=12)
plt.show()
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句