I know how to change values of the df under one condition (df_csv.loc[df_csv['X'] == 'train', ['A', 'B']] = ['t1', 't2'])`, but how do I change values in the df under multiple conditions?
What I've tried:
df_csv.loc[df_csv[['A', 'B']] == ['car', 'plane'], ['A', 'B']] = ['t1', 't2']
The error message I get is: KeyError Traceback (most recent call last) ~\AppData\Local\Temp/ipykernel_8032/3727894698.py in 14 15 ---> 16 df_csv.loc[df_csv[['A', 'B']] == ['car', 'plane'], ['A', 'B']] = ['t1', 't2']