gsheet = OSS_GSheet_Data()
hugo = API_Hugo_OSS()
participants = hugo.participants_oss()
df_gsheet = gsheet.df_participants_onsite(['Name','Chapter Leader','Project Leader'])
df_chapters = df_gsheet[df_gsheet['Chapter Leader'] != '']
for index, row in df_chapters.iterrows():
participant = participants.get(row['Name'])
participant.set_field('chapter_leader', row['Chapter Leader'])
participant.save()
df_projects = df_gsheet[df_gsheet['Project Leader'] != '']
for index, row in df_projects.iterrows():
name = row['Name']
value = [x.strip() for x in row['Project Leader'].split(',')]
participant = participants.get(name)
participant.set_field('project_leader', value)
participant.save()
"all done"