I am very much a novice at Python, but learning. I have been tasked at work to take a CSV of data (2500 rows) in the following format (as we cant figure out how to do it in Excel):
RefNumber Reviewer 1 Reviewer 2 Reviewer 3 Reviewer 4 Reviewer 5
9676/2 6 3 2
0526/4 6 3 1 5 1
1842/1 5 3 1 5
2693/3 5 5 1 2
2515/1 6 3 1 5 3
2987/1 4 1 3
3841/1 4 3 1
3402/1 4 3 1 5
And produce a CSV with each average of all the permutations of numbers that you could get from each row (minimum of 3).
i.e.
3841/1 above would produce the tuple of {4,3,1}, and an average of 2.7
3402/1 above would produce the tuples of {4,3,1}, {4,3,1,5}, {3,1,5},{4,1,5} etc with an average of 2.7, 3.3, 3, 3.3 etc.
I am wracking my brain trying to think of the best way of doing this, as I also need to know of each average, how many numbers in the tuple did it contain i.e. {4,3,1} would produce an average of 2.7 and the count of numbers of that tuple is 3.
Essentially what I want to produce is this:
RefNumber Avg 1 Avg 2 Avg 3 Avg 4 Avg 5
3841/1 2.7
3402/1 2.7 3.3 3 3.5
But I guess to show the count of the numbers in the tuple, I could run it 9 times (there is a maximum of 12 reviews) and just have each datasheet on its own tab.
I technically also need the standard deviation of each tuple and the range of scores, but this is already going wayyyyy past my expertise so I guess I can maybe drop that or do it manually somehow.
Any idea on where to start with this?