I want to create the following into a list comprehension:
scores = []
for x in df1_names:
for y in df2_names:
score = fuzz.ratio(x,y)
scores.append(score)
I have attempted the following, but I am not sure where to include the fuzz.ratio
.
matrix = [[x for x in df1_names] for y in df2_names]