human
I am working on the file "01-Text-as-Data/Intro.ipynb".
The first task is:
Let's get to know each other!
Can you write Python code for it?
assistant
#Here is the Python code you requested.

import random

def assign_groups(rseed):
    names = list(pd.read_csv('data/names.csv')['Name'])

    random.seed(rseed)
    random.shuffle(names)

    def make_groups(lst, min_size):
        num_groups = int(len(lst) / min_size)
        return [lst[i::num_groups] for i in range(num_groups)]

    for i, g in enumerate(make_groups(names, 2)):
        print(i+1, g)

assign_groups(1)