主要是对两个库的使用
使用pip进行安装
jupyter安装后再cmd下输入 jupyter notebook
成功的话会跳转到浏览器:
确实好用方便
在jupyter中编写
有个库是string中的。是标点符号的库。
from string import punctuation
可以做数据的过滤条件。如果不是标点符号
清洗数据后,更新
update方法
db.collection.update()
接收三个参数
1. 更新哪个文件(条件)
2. 怎么改。
3.如果没有是否要插入(bool)
如下图:
其他操作符
清洗后
可视化
Charts
例子:
import charts
#数据
series =[
{
'name':'OS X',
'data':[11],
'type':'column'
},
{'name':'Ubuntu',
'data':[8],
'type':'column'
},
{'name':'Windows',
'data':[12],
'type':'column'
},
{'name':'Other',
'data':[29],
'type':'column'
}
]
#使用charts绘画
charts.plot(series,show='inline',options=dict(title=dict(text='Charts test')))
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
- 11
- 12
- 13
- 14
- 15
- 16
- 17
- 18
- 19
- 20
- 21
- 22
- 23
- 24
- 25
- 26
- 27
- 28
运行后:好方便!