for current_string in list_strings:
    current_score = jellyfish.jaro_winkler(x, current_string)
if current_score > highest_jw:
    highest_jw = current_score
best_match = current_string
return best_match
df1 = pandas.DataFrame([[1], [2], [3], [4], [5]], index=['one', 'two',
    'three', 'four', 'five'], columns=['number'])
df2 = pandas.DataFrame([['a'], ['b'], ['c'], ['d'], ['e']], index=['one',
    'too', 'three', 'fours', 'five'], columns=['letter'])
df2.index = df2.index.map(lambda x: get_closest_match(x, df1.index))
df1.join(df2)
Python Pandas fuzzy merge/match with duplicates