I'm trying to replace values in a column to NaN. I normally use
imputed_data_x = imputed_data_x.replace(0, np.nan)
But my problem is that my values are not exactly 0, some are 0.01111,etc. How can I replace all values in a data frame that is less than 1?
I tried imputed_data_x = imputed_data_x.replace(>1, np.nan)
But it didn't work. I'm curious to see if I can use replace to do this or do I need a different command for conditions?