0

this is probably pretty simple, but here we go:

I've got a dataframe that contains football scores. I want to convert each team name into a unique identifier as they appear. See example screenshot: I.e. Richmond becomes "1", Carlton becomes "2", Collingwood "3", Western Bulldogs "4" and so on. These identifiers should be the same across homeTeam and awayTeam (i.e. Richmond becomes "1" across both lists).

I tried using for loops and if statements but it's a bit clunky.

0 Answers0