Day1 6.24
python基础
- 变量
- 输入输出
- 列表
- 常用内置函数
- 模块
- 条件判断
- 循环,range函数
- 函数定义,匿名函数
- 类,self
- 继承多态
Day2 6.25
爬虫 Scrapy
-
新建爬虫项目
scrapy startproject 项目名称 -
生成爬虫文件并编写
scrapy genspider 爬虫文件的名字 "要爬取的网页" -
在
item.py添加实体类 -
修改
pipeline.py的方法open_spider、process_item、close_spider
Vue
-
下载 HBuilderX 创建 vue项目(普通模式:在html中引用vue.js)
-
使用
v-for渲染数据<ul> <li v-for="(item,index) in student"> {{ item.name }} --- {{ item.age }} </li> </ul>
Day3 6.26
Axios
-
从本地 json 中请求数据并渲染
axios.get('student.json') .then((response) => { console.log(response.data); this.student = response.data; });
pymysql
-
使用 pymysql 链接本地数据库
connect = pymysql.connect(host="localhost", user="root", password="123456", database="s-t", port=3306)
Day4 6.27
pymysql
-
数据查询
cursor.execute(sql) result = cursor.fetchone() # 取回1个数据 all_ressult = cursor.fetchall() # 取回所有数据 -
数据插入、修改、删除
cursor.execute(sql) connect.commit() -
处理异常
Day5 6.28
图书管理系统
- 使用 pymysql 对数据库的增删改查
Day6 6.30
numpy
- ndarray
- np.array
- nparray 索引:范围索引、条件索引
- ndarray 合并:hstack、vstack、concatenatef
- arange、linspace、logspace
- ones、zeros、eye、empty
- fromstring
- random
- fromfunction
- 运算符:+-*/%
- 数学函数
- 点乘
- 转置 a.transpose() a.T
- 逆 inv(a)
- 统计 min/max/mean/var/std/median/sum/cumsum/ptp
Day7 7.1
PyQT
- 安装 pyqt5, 编写简单窗体程序
- 安装 qt5_applation
- 使用 designer 设计 UI 并保存
- 使用命令
python -m PyQt5.uic.pyuic test.ui -o test.py生成 python 代码
Day8 7.2
requests
- requests.get()
- 浏览器开发人员工具查看请求信息
BeautifulSoup
- bs.find()
- bs.find_all()
- bs.select_one()
CSV
-
csv读文件
with open("./data/data.csv", "r", newline="", encoding="utf-8") as s: fread = csv.DictReader(s, fieldnames=[]) for item in fread: print(item) -
csv写文件
with open("./data/data.csv", "w", newline="", encoding="utf-8") as c: fwrite = csv.DictWriter(c, fieldnames=[]) fwrite.writeheader() fwrite.writerows([])
Day9 7.3
WordCloud词云图
- 自定义词云形状
- jieba 切词
爬虫项目
Day10 7.4
答辩