![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
python
ReactSpring
尽力做好自己能做的事情,剩下的就交给时间吧。
展开
-
python对MySQL数据库增删改查
import pymysql database = pymysql.connect(“127.0.0.1”, “test”, “test”, “db”, charset=‘utf8’) 格式:pymysql.connect(“MySQL服务器地址”, “用户名”, “密码”, “数据库名”, charset=‘utf8’) cursor = database.cursor() 初始化指针 增 格式:“INSERT INTO 表名 (字段1,字段2,字段3) VALUES (内容1,内容2,内容3);” sq原创 2020-10-09 15:00:19 · 246 阅读 · 0 评论 -
实现多数据行列写入excel中
import xlrd import xlwt from xlutils.copy import copy xlsx = xlrd.open_workbook('d:/7月下旬入库表.xlsx') table = xlsx.sheet_by_index(0) all_data = [] for n in range(1, table.nrows): company = table.cell(n, 1).value price = table.cell(n, 3).value w原创 2020-10-08 09:29:17 · 291 阅读 · 0 评论 -
带格式写入excel
from xlutils.copy import copy import xlrd import xlwt tem_excel = xlrd.open_workbook('D:/日统计.xls', formatting_info=True) tem_sheet = tem_excel.sheet_by_index(0) new_excel = copy(tem_excel) new_sheet = new_excel.get_sheet(0) style = xlwt.XFStyle() font原创 2020-10-08 09:22:02 · 707 阅读 · 0 评论 -
爬取网络评论并且写到word文档里面
#-*- codeing = utf-8 -*- #@Time : 2020/10/7 9:06 #@Author : dualseason #@File : catch_data.py #@Software : PyCharm import requests import json file = open('venv/text/comment_new3.doc','a') resp = requests.get('https://club.jd.com/comment/productPageComme原创 2020-10-07 09:56:49 · 200 阅读 · 0 评论 -
爬取王者荣耀英雄图片代码
#-*- codeing = utf-8 -*- #@Time : 2020/10/6 23:05 #@Author : dualseason #@File : pink_catch.py #@Software : PyCharm import requests import json resp = requests.get('https://pvp.qq.com/web201605/js/herolist.json') heros_list = json.loads(resp.text) for hero原创 2020-10-06 23:56:54 · 732 阅读 · 0 评论