import pandas as pd
import os
path='C:/Users/Administrator/Downloads/重复/嘿嘿/'
list1=os.listdir(path)
data1=pd.DataFrame()
for i in list1:
data=pd.read_csv(path+i, skiprows=[0, 1, 2, 3, 4]) #skiprows固定跳前五行
data1=pd.concat([data1,data])
data1.to_excel('C:/Users/Administrator/Downloads/重复/嘿嘿/合并数据.xlsx')
Python 合并文件夹下多个Excel的方法。(Python&Excel - 1)
最新推荐文章于 2024-06-12 15:45:50 发布