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'd use `iloc`, which takes a row/column slice, both based on integer position and following normal python syntax. If you want every 5th row:

```
df.iloc[::5, :]

```
Adding `reset_index()` to [metastableB's answer](https://stackoverflow.com/a/46141173/11816073) allows you to only need to assume that the rows are *ordered and consecutive*.

```
df1 = df[df.reset_index().index % 3 != 0]  # Excludes every 3rd row starting from 0
df2 = df[df.reset_index().index % 3 == 0]  # Selects every 3rd row starting from 0

```

`df.reset_index().index` will create an index that starts at 0 and increments by 1, allowing you to use the modulo easily.