I want to iterate through a Pandas dataframe and get the fuzz.ratio score only for each row pair (not for all combinations). My dataframe looks like this:
Acct_Owner, Address, Address2
0, Name1, NaN, 33 Liberty Street
1, Name2, 330 N Wabash Ave Ste 39300, 330 North Wabash Avenue Suite 39300
There are missing values, so I am using "try:" to skip over missing value rows. Below is the current for loop:
for row in df_high_scores.index:
k1 = df_high_scores.get_value(row, 'Address')
k2 = df_high_scores.get_value(row, 'Address2')
try:
df_high_scores['Address_Score'] = fuzz.ratio(k1, k2)
except:
None
The result is showing the same score for all rows. Hoping to figure out why the loop isn't iterating through and scoring each row. Thanks for reading...