how to create a group id based on 5 minutes interval in pandas timeseries?,df.groupby(pd.TimeGrouper('5Min'))['val'].apply(lambda x: len(x) > 3)