I'm looking for a way to merge df. However, I don't know what would be the best way to do this.
first df - metro cities/population/teams
Metropolitan area | Population (2016 est.)[8] | NHL |
---|---|---|
Phoenix | 4661537 | Coyotes |
Los Angeles | 13310447 | Kings Ducks |
Toronto | 5928040 | Maple Leafs |
Boston | 4794447 | Bruins |
Edmonton | 1321426 | Oilers |
New York City | 20153634 | Rangers Islanders Devils |
Second df - team/wins/losses
team | w | L |
---|---|---|
Los Angeles Kings | 46 | 28 |
Phoenix Coyotes | 37 | 30 |
Toronto Maple Leafs | 49 | 26 |
Boston Bruins | 50 | 20 |
Edmonton Oilers | 29 | 44 |
New York Islanders | 34 | 37 |
I tried to merge across teams. However, I need to arrange this data so that it collides in the Merge. I don't know how I would do that without looking at it case by case.
Note: The data set is much larger and with more cities and teams. I had a little trouble presenting the DF here, so I only put 6 rows and the main columns.