import pandas as pd
dates = ["20200218_v2.csv","20200219_v2.csv","20200220_v2.csv","20200221_v2.csv"]
# 循环读取并,生成多列
writer = pd.ExcelWriter("total-0221.xlsx")
for date in dates:
df = pd.read_csv(date)
df.to_excel(writer,sheet_name=date)
writer.save()
使用pandas将多个excel文件合并为一个(作为sheet)
最新推荐文章于 2022-11-16 14:55:33 发布