plot.py 584 B

123456789101112131415161718192021222324
  1. #!/usr/bin/env python
  2. # -*- coding: utf-8 -*-
  3. '''
  4. @Auther :liuyuqi.gov@msn.cn
  5. @Time :2018/7/9 22:26
  6. @File :plot.py
  7. '''
  8. def plotGroup(): # df3新建一列
  9. df3["disk"] = None
  10. for i in range(0, 68219):
  11. df3["disk"][i] = lambda x: x[i], df1["disk"]
  12. # instance分类统计
  13. group1 = df3.groupby("appid").count()
  14. print(type(group1))
  15. print(group1["instanceid"].sort_values(ascending=False))
  16. plt.plot(group1["instanceid"].sort_values(ascending=False))
  17. plt.savefig("../submit/group1.jpg")
  18. # 找到每个instance消耗的disk
  19. # df3["disk"] =