分析数据:charts
作者:
泠泠七弦客 | 来源:发表于
2016-08-12 23:12 被阅读0次
结果及代码:

charts跟之前用的char.js是一样的套路

自己数据抓错了,抓的不是项目,所以就用url解析了,而且加了野鸡的50这个magic number

这个技巧要学一下:从list中去重并统计个数。
1.先用set集合来去重2.再用list.count(i)来统计每个set中元素的个数

生成器,这点讲的很到位,仿佛一瞬就明白了

最终结果
新技能get:
- 这个jupyter是个在线编译器,每一步都要进行运行,shift+enter运行,之后结果会显示出来
-
chart的套路,这个跟chart.js真的是如出一辙
套路代码
series = [i for i in data_gen('column')]
charts.plot(series,show="inline",options=dict(title=dict(text="项目分类")))
- 数据库在终端的操作,这么做就是为了备份一下以免破坏了数据

在终端中使用
总结:
基本都是套路,没啥困难
本文标题:分析数据:charts
本文链接:https://www.haomeiwen.com/subject/chuesttx.html
网友评论