zoukankan      html  css  js  c++  java
  • 111

    # -*- coding: utf-8 -*- #auther tonyxiao import xlrd workbook = xlrd.open_workbook('D:/Desktop/workload.xls') # 打开excel数据表 SheetList = workbook.sheet_names() # 读取电子表到列表 SheetName = SheetList[0] # 读取第一个电子表的名称 Sheet1 = workbook.sheet_by_index(0) # 电子表索引从0开始 Sheet1 = workbook.sheet_by_name(SheetName) # 实例化电子表对象 a = 0 b = 0 c = 0 d = 0 e = 0 f = 0 g = 0 for i in range(Sheet1.nrows): rows = Sheet1.row_values(i) if rows[5] == 'suzu - Suo Zhu': a += 1 if rows[5] == 'fxia - Feng Xiao': b += 1 if rows[5] == 'wyql - David Liu': c += 1 if rows[5] == 'jnug - Jingyuan Gu': d += 1 if rows[5] == 'ruim - Ruiming Ma': e += 1 if rows[5] == 'ckul - Kun Li': f += 1 print('suzu - Suo Zhu', a) print('fxia - Feng Xiao', b) print('wyql - David Liu', c) print('jnug - Jingyuan Gu', d) print('ruim - Ruiming Ma', e) print('ckul - Kun Li', f) #画图 import numpy as np import matplotlib.mlab as mlab import matplotlib.pyplot as plt X=[1,2,3,4,5,6] Y=[a,b,c,d,e,f] fig = plt.figure() plt.bar(X,Y,0.4,color="green") plt.xlabel("name") plt.ylabel("ticket quantity") plt.title("workload chart") plt.show() plt.savefig("barChart.jpg")

  • 相关阅读:
    Tsar 服务器系统和应用信息的采集报告工具
    mysqltuner
    MySQL性能监控工具-MONyog
    tuning-primer.sh mysql 报表
    mytop
    InnoTop
    mysql监控管理工具--innotop
    iotop,pt-ioprofile : mysql IO负载高的来源定位
    PERCONA-TOOLKIT 工具的安装与使用2
    PERCONA-TOOLKIT : pt-ioprofile分析IO情况
  • 原文地址:https://www.cnblogs.com/latefall/p/9277113.html
Copyright © 2011-2022 走看看