I´m reading some excel files where I want to calculate the mean of the column 'Duration' but I want to see the change in mean after recording 1, 2, 3 and so on. So for the below table it would be:
Mean1 = (3+3+3/3)
Mean2 = (3+3+3+4+6/5)
Mean3 = (3+3+3+4+6+4+3+1+4/9)
Each file can have different number of recordings (but always starting from 1) and different number of durations for each recording.
Is is possible in Python to make a script that does this automatically?
| Recording | Duration |
|---|---|
| 1 | 3 |
| 1 | 3 |
| 1 | 3 |
| 2 | 4 |
| 2 | 6 |
| 3 | 4 |
| 3 | 3 |
| 3 | 1 |
| 3 | 4 |