pandas 按照列进行求和

pandas 按照列进行求和

 

 

效果不是特别好。

 

绘制完之后,希望还能绘制一个按列的直方图

r1 = pInfo.apply(lambda x: x.sum())

然后将

绘制成一个直方图

 

 

r1 = pInfo.apply(lambda x: x.sum())
r2 = r1[1:r1.shape[0]-1]#
barh = r2.plot(kind='barh')
plt.show()
f = barh.get_figure()
f.savefig('./myplot5.png')

 

 

posted @ 2020-10-26 23:59  bH1pJ  阅读(165)  评论(0编辑  收藏  举报