Assume I have the following pd.DataFrame:
df = pd.DataFrame({'a': [10, 20, 30],
'b': [5, 25, 30]})
and I wish to get
a b label
0 10 5 1
1 20 25 2
2 30 30 3
meaning:
- if a > b then label=1
- if a < b then label=2
- if a = b then label=3
I'm not sure how to do so when I have multiple conditions.