wangwei
机器学习, 数据采集, 数据分析, web网站,IS-RPA,APP
python基础 padas 数据合并 xls • 5 回帖 • 1K 浏览 • 2019-07-25 09:27:30


机器学习, 数据采集, 数据分析, web网站,IS-RPA,APP
python基础 padas 数据合并 xls • 5 回帖 • 1K 浏览 • 2019-07-25 09:27:30
Pandas 合并多个 xls 文件
import pandas as pd
file1='a.xlsx'
file2='b.xlsx'
file3='c.xlsx'
file=[file1,file2,file3]
li=[]
for i in file:
li.append(pd.read_excel(i))
writer = pd.ExcelWriter('result.xlsx')
pd.concat(li).to_excel(writer)
writer.save()
writer.close()
简单粗暴有效
简单粗暴有效
简单粗暴有效
哈哈
你这是简单粗暴啊 😅