'Subset df by N rows having Timestamps in Python

I have a long dataframe from which I want to subset a range of rows (size = 60) and do some operations using for-loop iteration.

If not the above, based on the 'Timestamps' col (type is timestamp), I need to subset df for 15 mins duration.

Please provide suggestions for both, if possible.

DataFrame



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source