I have a dataframe of football matches, like so:
team_id adversary_id round_id xG
262 263 1 0.45
263 262 1 0.34
245 254 1 0.67
254 245 1 0.15
...
How do I get rid of repeated fixtures and change dataframe into this wider format:
team_id adversary_id round_id xG_team xG_adversary
262 263 1 0.45 0.34
245 254 1 0.67 0.15
...