unfortunately I'm having trouble creating a correct display of mianowiecie values. I have such a DF:
Group | Match | Team |
---|---|---|
A | 1 | A1 |
A | 1 | A2 |
A | 2 | A3 |
A | 2 | A4 |
I have this code:
for group in set(world_cup['Group']):
print('___Starting group {}:___'.format(group))
for home, away in combinations(world_cup.query('Group == "{}"'.format(group)).index, 2):
#conditions....
I added a third loop so that instead of selecting group it selects game. However, I do not get the expected result because it shows all the matches in one group first and then the same matches in other groups. I would like to get something like this:
___Starting group A:__
A1-A2
A3-A4
Now I get something like this
___Starting group A:__
A1-A2
A1-A3
A1-A4
A2-A3
A2-A4
A3-A4
Thank everyone for help.