#!/usr/bin/python # -*- coding: UTF-8 -*- import pandas as pd import os if __name__ == ‘__main__‘: Folder_Path = ‘c:\data1‘ os.chdir(Folder_Path) file_list = os.listdir() dfs = [] for item in file_list: dfs.append(pd.read_excel(Folder_Path + ‘\\‘ + item)) df = pd.concat(dfs, sort=False) df.to_excel(‘c:\data1\out.xlsx‘, index=False)
原文地址:https://www.cnblogs.com/donggongdechen/p/10570515.html
时间: 2024-10-22 10:47:00