I have this dataframe
import pandas as pd
x = pd.DataFrame.from_dict({'A':[1,2,0,4,0,6], 'B':[0, 0, 0, 44, 48, 81], 'C':[1,0,1,0,1,0]})
I try to change it like this, but it doesn't work
x[x['A']>3]['A'] = 33 # has no effect
I also tried
x.loc(x['A']>3)['A'] = 33 # getting an error
So what's the right way to do this?