image_output_1.png
import pandas as pd

df = pd.read_csv('/kaggle/input/ufc-fights-2010-2020-with-betting-odds/data.csv')

df = df.dropna()

df['underdog'] = ''
red_underdog_mask = df['R_odds'] > df['B_odds']
blue_underdog_mask = df['B_odds'] > df['R_odds']
even_mask = df['B_odds'] == df['R_odds']
df['underdog'][red_underdog_mask] = 'Red'
df['underdog'][blue_underdog_mask] = 'Blue'
df['underdog'][even_mask] = 'Even'