I have a data frame and what I am trying to do is essentially tabulate the score of the winning and losing team in the same spot. I have tried to put a lambda function, but have had no success with it. The data frame I currently have is the first one and I would like to create a dataset in the form of the second question. Thanks.
GameId Team Home Score
1 Spirit 1 81
1 Rockers 0 66
2 Lightning 1 73
2 Flames 0 82
Game ID Home Team Away Team Home Score Away Score
1 Spirit Rockers 81 66
2 Lightning Flames 73 82


