数据收集
1.1 文件
- CSV
- Excel
- 图形
1.2 数据库
- pymysql
1.3 网页
- 爬虫
- 抓取
- urllib内建模块
- urllib.request
- Requests第三方库
- Scrapy框架
- urllib内建模块
- 解析
- Beautiful Soup库(bs4)
- re模块
- 抓取
1.4 直接下载
1.5 Python模块中数据集&语料库
-
API
import pandas_datareader.data as web
f = web.DataReader(‘AXP’, ‘stooq’)
f.head() -
sklearn.datasets
from sklearn import datasets
iris = datasets.load_iris() #燕尾花数据 -
NLTK语料库
网络和聊天文本(webtext)
就职演说(inaugural)
路透社(reuters)
布朗(brown)
古腾堡(gutenberg)