import os
import pandas as pd
path = r'C:\Users\Admin\Desktop\111'
file_paths = os.listdir(path)
df = 0
for item in file_paths:
df += pd.read_csv(path + '\\' + item).iloc[0:, 1:]
(df/len(file_paths)).to_csv('ave.csv')
csv文件的同一位置单元格求均值 结果保存到新的csv文件
于 2023-04-17 23:56:37 首次发布