max_speed shield new
1 1 2 3
2 4 5 6
I got this dataframe, and I want to assign a value according to some column names. like this df.loc[df['max_speed']==1, df['shield']==2, new] = 10 then I will get the new dataframe:
max_speed shield new
1 1 2 10
2 4 5 6
Anyone know how to do it?