# 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.

## closed as off-topic by m_goldberg, MarcoB, Henrik Schumacher, Carl Lange, C. E.May 1 at 13:00

• The question does not concern the technical computing software Mathematica by Wolfram Research. Please see the help center to find out about the topics that can be asked here.
If this question can be reworded to fit the rules in the help center, please edit the question.

• 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 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}]]