df = pd.DataFrame({'dt': ['2017-01-01 12:00:00', '2017-01-01 12:01:00',
    '2017-01-01 12:02:00', '2017-01-01 12:03:00', '2017-01-01 12:04:00',
    '2017-01-01 12:05:00', '2017-01-01 12:06:00', '2017-01-01 12:07:00',
    '2017-01-01 12:08:00', '2017-01-01 12:09:00', '2017-01-01 12:10:00',
    '2017-01-01 12:11:00', '2017-01-01 12:12:00', '2017-01-01 12:13:00',
    '2017-01-01 12:14:00', '2017-01-01 12:15:00'], 'val': [33, 42, 44, 6, 
    70, 94, 42, 97, 12, 11, 66, 71, 25, 23, 39, 25]})
df.index = df.index * 10
N = 3
idx = df['val'].rolling(window=N).sum()
i = np.nanargmax(idx) + 1
print(df.iloc[i - N:i])
Python Pandas - find consecutive group with max aggregate values