How do I calculate the average of dataframes created by batchsizes of csv file?
Input:
A,1
B,2
B,1
C,2
A,1
B,3
B,1
C,1
A,1
B,2
B,1
C,3
I want to group them by 4 rows (A,B,B,C) and calculate the average of 2nd column.
output:
A, average(1,1,1)
B, average(2,3,2)
B, average(1,1,1)
C, average(1,2,3)