I have data which has special characters, I want to change the conditional cell values.
Data is below first few lines df_orig:
idx A B C D
0 0.5 2 5 #
1 3 5 8 %
2 6 8 10 $
3 9 10 15 $
4 11 15 18 #
I want to change cell values where $ in D, A = 0 and B = C
THE OUTPUT SHOULD BE change:
idx A B C D
0 0.5 2 5 #
1 3 5 8 %
2 0 10 10 $
3 0 15 15 $
4 11 15 18 #
I tried at my end with
change = df_orig.loc[(df.orig['D'] == '$'), df_orig['A'] == '0'& df_orig['B'] = df_orig['c']
but it didn't work.