I have a time series data frame, and I want to list the days when in three consecutive days, High was the highest the second day and the same thing but the value of Low was the lowest the second day. I tried these two lines but I hardcoded the date after viewing the data. I want to know if there is a way to not hardcode it.
df_highest = df.loc['1986-03-17':'1986-03-19', 'High'].max()
df_lowest= df.loc['1986-03-24':'1986-03-26', 'Low'].min()
Here's a piece of data.
