In [21]:
# Load schools from salesforce
account_df = get_cysh_df('Account', ['Id', 'Name'])
account_df.rename(columns={'Id':'Organization__c', 'Name':'School'}, inplace=True)

d = []
for folder_name in set(heatmaps_df['Folder']):
    match = process.extract(folder_name, set(account_df['School']), scorer=fuzz.token_set_ratio, limit=1)
    match = [folder_name] + [x for tup in match for x in tup]
    d.append(match)
df = pd.DataFrame(d, columns=['Folder', 'School', 'Match_Score'])
df.head()
Out[21]:
Folder School Match_Score
0 Gage Park Gage Park High School 100
1 Johnson Johnson School of Excellence 100
2 Phillips Wendell Phillips Academy 100
3 Langford Anna R. Langford Community Academy 100
4 Jordan Jordan Elementary Community School 100