I need to make a mathematical operation which is conditional on the value in a second column. Here is the setup.
Given a simple dataframe (df):
df
I was also able to do the following...
df['math'] = 10 + df.loc[df['col1'] == 'B']['col3']
Which is a variation on @user3483203 answer above. Ultimately, my 'B' is a variable, so I modified for @RafaelC 's comments.
'B'