Getting Code to Match up Misspelled Names

This code changes misspelled names to the correct spelling so when the code merges the two files together, the names will match up.
***SM has to be >.95 (this number was found testing different names that had extra spaces)

i=0
j=0
for rows in AttS14['First Name']:
    print rows
    for rws in Attendance['First Name']:
        print 'Attendance',rws
        if(SM(None,rows,rws).ratio()>0.95):
            print rows,rws,SM(None,rows,rws).ratio()
            AttS14.loc[i,'First Name']=rws
            print AttS14.loc[i,'First Name']
           
        j=j+1
    i=i+1
AttS14

Comments

Popular posts from this blog

6/14/17 Notes

6/06/17 Notes (formatting code and searching for a specific person)

May 22, 2017 -- SienaSemanticsSurvey -- Code Breakdown -- Cell #8