df
df['A'].mask(df['A'] == 1, df['B'], axis=0, inplace=True) df
df['A'].mask(lambda x: x > 1, lambda x: x + 10, inplace=True) df