I'm trying to compare 2 lists and get a distance ratio for each item on the list. My code below returned an attribute error: 'Series' object has no attribute 'fuzz'. How do i fix this?
'differences' is a result from my earlier code for a list of companies with actual comparison (exact match) and df['Company'] is a column in my dataframe i'm trying to compare with.
from fuzzywuzzy import fuzz
from fuzzywuzzy import process
str1 = ['differences']
str2 = df['Company']
print ("distance {} -> {}: {}".format(str1,str2.fuzz.ratio(str1,str2)))