Quantcast
Channel: calculating the mean of columns in text files - Stack Overflow
Viewing all articles
Browse latest Browse all 3

calculating the mean of columns in text files

$
0
0

I have two folders named f1 and f2. These folders contain 300 text files with 2 columns.The content of files are shown below.I would like to calculate the mean of second column.file names are same in both folders.

file1 in f1 folder54  655 1057 5file2 in f1 folder24  828  12file1 in f2 folder34 322 8file2 in f2 folder24  828  13

output

                   folder1       folder2     file1         21/3= 7       11/2=5.5     file2         20/2=10       21/2=10.5      --            --             --          --            --             --    file300         --             --              total mean of folder1 = sum of the means/3oo              total mean of folder2 = sum of the means/3oo

Viewing all articles
Browse latest Browse all 3

Latest Images

Trending Articles





Latest Images