Drop dates based on condition in python
问题 I'm trying to implement a condition where if the count of incorrect values is greater than 2 (2019-05-17 & 2019-05-20 in the example below) then the complete date (all the time blocks) is removed Input t_value C/IC 2019-05-17 00:00:00 0 incorrect 2019-05-17 01:00:00 0 incorrect 2019-05-17 02:00:00 0 incorrect 2019-05-17 03:00:00 4 correct 2019-05-17 04:00:00 5 correct 2019-05-18 01:00:00 0 incorrect 2019-05-18 02:00:00 6 correct 2019-05-18 03:00:00 7 correct 2019-05-19 04:00:00 0 incorrect