I have two columns home and away. So one row will be England vs Brazil and the next row will be Brazil England. How can I count occurrences of when Brazil faces England or England vs Brazil in one count?
Based on previous solutions, I have tried
results.groupby(["home_team", "away_team"]).size() results.groupby(["away_team", "home_team"]).size()
however this does not give me the outcome that I am looking for.
England Brazil 1
Brazil England 1
I would like to see: England Brazil 2