I have this Pandas dataframe:
This is some fictional data about games of cricket played between two countries. I want to set the value of column winner based on this simple logic:
if country_1_runs == country_2_runs:
winner = 3
elif country_1_runs > country_2_runs:
winner = 1
else:
winner = 2
I know about map and apply methods in Pandas. But I'm not certain if they allow conditional expressions like the above.
