I am trying a apply a lambda function to a pandas data frame. My question is how can I apply a lambda function to column a based on value in column b using if statement.
A B C
2 5 7
4 5 9
6 7 9
df['B'].apply(lambda x: x+3 if x<(#the value in column C) else x)