1 Star 0 Fork 0

陈强/python-api-tesing

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
excel_summary_demo.py 1.33 KB
一键复制 编辑 原始数据 按行查看 历史
china-testing 提交于 2018-05-24 17:56 . init
#!/usr/bin/python3
# -*- coding: utf-8 -*-
# Author: xurongzhong#126.com wechat:pythontesting qq:37391319
# CreateDate: 2018-3-7
# excel_summary_demo.py
import pandas
from data_common import merge_excel
file1= r"2.12.0.xlsx"
file2= r"2.13.0.xlsx"
output = r"output.xls"
df1 = pandas.read_excel(file1,sheet_name='paper')
df2 = pandas.read_excel(file2,sheet_name='paper')
df2 = df2.rename(index=int, columns={"汇总图片": "汇总","用例编号":"编号"})
columns = ["type","测试用例","汇总",'2pd-v2.11','2pd-v2.12','2pd-v2.13',
'2pd-v2.14','2pd-v2.15']
df3 = merge_excel(df1, df2, '测试用例',fixes=["type","编号"], sorts=["type","编号"],
columns=columns)
df4 = pandas.read_excel(file1,sheet_name='human')
df5 = pandas.read_excel(file2,sheet_name='human')
df5 = df5.rename(index=int, columns={"汇总图片": "图片总数"})
columns = ['用例编号',"测试用例","图片总数",'2pd-v2.11','2pd-v2.12','2pd-v2.13',
'2pd-v2.14','2pd-v2.15']
df6 = merge_excel(df4, df5, '用例编号',fixes=["用例编号","测试用例"], sorts=["用例编号"],
columns=columns)
writer = pandas.ExcelWriter(output)
df3.to_excel(writer, sheet_name='paper', index=False)
df6.to_excel(writer, sheet_name='human', index=False)
writer.save()
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Python
1
https://gitee.com/chenqiang97/python-api-tesing.git
git@gitee.com:chenqiang97/python-api-tesing.git
chenqiang97
python-api-tesing
python-api-tesing
master

搜索帮助

0d507c66 1850385 C8b1a773 1850385