I have some marketing data with 1-minute interval. As a sample of csv-table, each row represents max values for each minute:
time ch1 ch2 ch3 ch4
20:03 1754 539 149 1337
20:04 2073 576 160 1448
20:05 2246 599 176 1515
20:06 2246 637 176 1531
20:07 2457 651 183 1549
20:08 2564 677 184 1655
20:09 2624 712 191 1699
20:10 2742 717 194 1672
20:11 2788 714 199 1675
20:12 2792 693 186 1680
20:13 2914 708 188 1672
20:14 3067 715 194 1685
20:15 3067 725 196 1682
additionally, I need to find max values for each 5 minute. So I need to find max for every 5 rows (or less - if there are no more rows remained) of each columns and insert it to new 5-minute row.
What I looking to recieve (as example):
each new row has to represent max value for 5
time ch1 ch2 ch3 ch4
20:03 2564 677 184 1655
20:08 2914 717 199 1699
20:13 3067 725 196 1685
I honestly have searched but no result.
Is there in Python some elegant solution for my task? Thank for your help!