1 import   pandas
 2 from  matplotlib import pyplot
 3 excel=pandas.read_excel('填充日期.xlsx')
 4 excel.sort_values(by='score',ascending=False,inplace=True)
 5 print(excel)
 6 
 7 #开始绘制柱状图
 8 #excel.plot.bar(x='name',y='score',color='orange',title='score')
 9 pyplot.bar(excel.name,excel.score,color='orange')
10 pyplot.xticks(excel.name,rotation=45)
11 pyplot.yticks(excel.score,rotation=45)
12 
13 
14 pyplot.tight_layout()    #紧凑放置
15 pyplot.show()

 

扫码关注我们
微信号:SRE实战
拒绝背锅 运筹帷幄

SRE实战 互联网时代守护先锋,助力企业售后服务体系运筹帷幄!一键直达领取阿里云限量特价优惠。