I have a column with values which represent the temperature of every hour in a day. What I am trying to do is to change every value less than 18 to a 0. But if there is at least one value for each 24 rows (hours) that is greater than 18, I want to change all 24 values to 1.
Is there any function or loop that I can use for this problem?