import os
from tqdm import tqdm
path = ‘your path’
path_list = os.listdir(path)
path_list.sort(key=lambda x:int(x[:-4]))
print(path_list)
for filename in tqdm(path_list):
df = pd.read_csv(os.path.join(path,filename))
python顺序遍历文件夹下的文件
最新推荐文章于 2023-09-07 17:25:15 发布