import pandas as pd
import os
#path为要处理的文件夹的路径
path = r"D:\plan\2022-04"
#path_1处理后的文件夹的位置
path_1 = r"D:\plan\2022-04_处理后"
#获取path路径下的文件名
filename = os.listdir(path)
for i in range(len(filename)):
df = pd.read_excel("D:\\plan\\2022-04\\"+filename[i])
#....你要处理的步骤
filename_1 = f"{path_1}/{filename[i]}.xlsx"
df.to_excel(filename_1,index=False)
11-09
627
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)
09-21
2846
![](https://csdnimg.cn/release/blogv2/dist/pc/img/readCountWhite.png)