So I need to replace all values in my dataframe named 'x', that are greater than 140 and less than 35, with 0. I have 600 columns all named 1-600. I've tried the method below but I can't figure out how I can apply this to the entire dataset.
x=x.mask(x['1']>140,0)
When I try doing this
x=x.mask(x>140,0)
This is the error message:
TypeError: '>' not supported between instances of 'str' and 'int'
Can someone please help me out, thank you.