# Performing loop operation (average on lists of datas) of strings of datas [closed]

Lets say I have 100 CSV files of two columns data in each file, and I want to calculate the average of the 2nd column of each CSV file and then save all all these 100 averaged values in one CSV file (in one column) and then plot this CSV file of averaged values with respect to another CSV file having one column (100 datas in it)

Please give me a mathematica code for this.

• I'm voting to close this question as off-topic because there is no well-posed question in this post; the OP is simply asking for somebody to act as a free coding service. – m_goldberg Apr 30 '19 at 9:30

Assume you have a list, FileNameList, of your file names, and that they all explicitly have .csv as the extension.

data=Import/@FileNameList;
averages=Mean/@(data[[All, All, 2]]);
Export["averages.csv",averages]
xdata=Import["otherfile.csv"];
ListPlot[Transpose[{xdata,averages}]]