Ah yeah sorry, i can see that now. But let's put it like this. I have a chunk of data (a list of list) and i want to get the sum of certain columns (Mean and hit) sorted by keys (Team, League, Odds group):
The data:
Team League Odds group Mean Hit
Arsenal PL 1 0,4 0,5
Fulham PL 3 0,25 0,4
Aston Villa CL 2 0,55 0,6
Sunderland L1 1 0,43 0,5
Arsenal PL 1 0,3 0,4
Fulham PL 2 0,5 0,5
Aston Villa CL 1 0,4 0,5
Sunderland L1 1 0,4 0,6
The sum sorted by team
Sum by team Mean Hit
Arsenal 0,7 0,9
Fulham 0,75 0,9
Aston Villa 0,95 1,1
Sunderland 0,83 1,1
The sum sorted by league
Sum by league Mean Hit
PL 1,45 1,8
PL 1,45 1,8
CL 0,95 1,1
The sum sorted by odds group
Sum by odds group Mean Hit
1 1,93 2,5
2 1,05 1,1
3 0,25 0,4
Is there a clever way to accomplish this? Maybe use a dictionary or a class or something else?
Hope this makes the question more clear :)
The data:
Team League Odds group Mean Hit
Arsenal PL 1 0,4 0,5
Fulham PL 3 0,25 0,4
Aston Villa CL 2 0,55 0,6
Sunderland L1 1 0,43 0,5
Arsenal PL 1 0,3 0,4
Fulham PL 2 0,5 0,5
Aston Villa CL 1 0,4 0,5
Sunderland L1 1 0,4 0,6
The sum sorted by team
Sum by team Mean Hit
Arsenal 0,7 0,9
Fulham 0,75 0,9
Aston Villa 0,95 1,1
Sunderland 0,83 1,1
The sum sorted by league
Sum by league Mean Hit
PL 1,45 1,8
PL 1,45 1,8
CL 0,95 1,1
The sum sorted by odds group
Sum by odds group Mean Hit
1 1,93 2,5
2 1,05 1,1
3 0,25 0,4
Is there a clever way to accomplish this? Maybe use a dictionary or a class or something else?
Hope this makes the question more clear :)