df['Age_Group'][df['Age'] > 40] = '>40'
df['Age_Group'][(df['Age'] > 18) & (df['Age'] < 40)] = '>18'
df['Age_Group'][df['Age'] < 18] = '<18'
Pandas dataframe add a field based on multiple if statements