CSDN博客地址

随笔分类 -  Python操作Excel

摘要:Python没有自带openyxl,需要安装: pip install openyxl 打开excel文档: openyxl.load_workbook(excel地址) - 打开现有excel文件 openyxl.Workbook() - 新建一个excel文件 返回一个工作博对象 import 阅读全文
posted @ 2020-08-01 14:25 Yi_warmth 阅读(1741) 评论(0) 推荐(0)
摘要:def write_report(url, excel_name, sheet_name): import re import ast import pandas as pd import openpyxl from copy import deepcopy resp = requests.get( 阅读全文
posted @ 2020-05-20 19:56 Yi_warmth 阅读(3412) 评论(0) 推荐(0)
摘要:pandas将excel内容生成在线的html: #encoding:utf-8import pandas as pdimport codecs def test19(): xd = pd.ExcelFile('b站.xls') df = xd.parse() with codecs.open('1 阅读全文
posted @ 2020-04-16 14:49 Yi_warmth 阅读(529) 评论(0) 推荐(0)
摘要:pandans依赖处理Excel的xlrd模块,所以需要提前安装, 安装命令: pip install xlrd; 提前准备一个Excel文件,存在两个表单; 读取Excel的方式: 1:默认读取第一个表单 import pandas as padf = pa.read_excel("./1.xls 阅读全文
posted @ 2019-07-14 15:59 Yi_warmth 阅读(951) 评论(0) 推荐(0)

CSDN博客地址