摘要: 1.查询 import pymysql conn = pymysql.connect(host='127.0.0.1', user='root', passwd='root', db='test') cur = conn.cursor() 查询 sql = "select * from info" 阅读全文
posted @ 2018-11-09 13:48 红豆· 阅读(152) 评论(0) 推荐(0) 编辑
摘要: xlrd模块:只能读xls文件 data = xlrd.open_workbook('excelFile.xls') 打开excel文件 获取表 r_sheet = data.sheet_names() 获取所有的表名 table = data.sheets()[0] 通过索引获取表 table = 阅读全文
posted @ 2018-11-09 11:25 红豆· 阅读(220) 评论(0) 推荐(0) 编辑