For my data, I want to sample 5 lots of 5 consecutive days. For each 'group' of 5-day samples, I want the value in another column to be the same. My data is a time series. Here's a sample:
Previously, when I was happy with non-consecutive days, I'd use the following code:
df.groupby("AGENT").sample(n=5, random_state=1, replace = True)
I want it to be random, so I don't just want to take the index for the first new agent and then the subsequent 4 rows.