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]

```
A solution I came up with when using the index was not viable ( possibly the multi-Gig .csv was too large, or I missed some technique that would allow me to reindex without crashing ).  

Walk through one row at a time and add the nth row to a new dataframe.

```
import pandas as pd
from csv import DictReader

def make_downsampled_df(filename, interval):    
    with open(filename, 'r') as read_obj:
        csv_dict_reader = DictReader(read_obj)
        column_names = csv_dict_reader.fieldnames
        df = pd.DataFrame(columns=column_names)

        for index, row in enumerate(csv_dict_reader):
            if index % interval == 0:
               print(str(row))
               df = df.append(row, ignore_index=True)

    return df

```