for example:
A B
1 3 0
2 4 0
3 6 1
4 8 0
I'd like to know if there is a simple way to add for example 10 to the value of column A whene in B there is 1.
I'd like to have a df output like below.
A B
1 3 0
2 4 0
3 16 1
4 8 0
I've found something like the line of code below but this one replace the 6 with 1, I'd like to use that 6 to make some operations on it.
PS. pardón for my english
df.loc[df['B'] == 1, 'A'] = 1