Question: `Dataframe.resample()` works only with timeseries data. I cannot find a way of getting every nth row from non-timeseries data. What is the best method?

Answer: 
I had a similar requirement, but I wanted the n'th item in a particular group. This is how I solved it.

```
groups = data.groupby(['group_key'])
selection = groups['index_col'].apply(lambda x: x % 3 == 0)
subset = data[selection]

```
```
df.drop(labels=df[df.index % 3 != 0].index, axis=0) #  every 3rd row (mod 3)

```