import requests
import json
import pprint
import csv
import pandas as pd

IMPORTFILE = "/Users/normrasmussen/Downloads/chubb-old.csv"

data = pd.read_csv(IMPORTFILE)
groups = data["Group"].unique()
print(groups)
groups = list(groups)
for group in groups:
    payload = ""
    tmp_group = data[data.Group == group]
    people = list(tmp_group["Email"])
    group = str(tmp_group["Group"].unique())[2:-2]
    for learner_email in people:
        agency_name = data.loc[data['Email'] == learner_email, 'AgencyName']
        agname = str(agency_name.values)[2:-2]
        print(agname)
        # ppl_search = f"{BASEURL}people?filter[email][eq]={learner_email}"
