I'm trying to execute conditional statements on time series data. Is there a way to set the "t_value" to zero if the time is between 1) 00:00:00 and 02:00:00 2) 04:00:00 & 06:00:00
t_value
2019-11-24 00:00:00 4.0
2019-11-24 01:00:00 7.8
2019-11-24 02:00:00 95.1
2019-11-24 03:00:00 78.4
2019-11-24 04:00:00 8.0
2019-11-24 05:00:00 17.50
2019-11-24 06:00:00 55.00
2019-11-24 07:00:00 66.00
2019-11-25 00:00:00 21.00
2019-11-25 01:00:00 12.40
if-else & np.where are probable options but I'm unsure on how to implement the conditions on hours.