I have a dataset that collects data from text. This is time series data and sometimes it is in error. I need to remove rows from them by condition: when the number is between two numbers that are greater than it. You also need to take into account the date, which may coincide with the value from the string. Here is an example entry and what I want to get (dataframe):
date infected_in_all
369 14-01-2021 722487.0
370 14-01-2021 19.0
371 13-01-2021 715438.0
546 29-07-2020 176437.0
547 28-07-2020 1.0
548 28-07-2020 175812.0
549 27-07-2020 1.0
550 27-07-2020 174985.0
551 26-07-2020 174721.0
date infected_in_all
369 14-01-2021 722487.0
371 13-01-2021 715438.0
546 29-07-2020 176437.0
548 28-07-2020 175812.0
550 27-07-2020 174985.0
551 26-07-2020 174721.0
Need help writing a condition.