I try to compare each row with all rows in a pandas dataframe with fuzzywuzzy.fuzzy.partial_ratio() >= 85 and write the results in a list for each row.
Example:
df = pd.DataFrame({'id': [1, 2, 3, 4, 5, 6], 'name': ['dog', 'cat', 'mad cat', 'good dog', 'bad dog', 'chicken']})
I want to use a pandas function with the fuzzywuzzy library to get the result:
id  name     match_id_list
1   dog      [4, 5]
2   cat      [3, ]
3   mad cat  [2, ]
4   good dog [1, 5]
5   bad dog  [1, 4]
6   chicken  []
But I don't understand how to get this.