May-27-2020, 08:10 AM
Here’s my current code:
title2 is a list of product title from google website
id1 is an id corresponding to amazon website product
id2 is an id corresponding to google website product
Both of them have a list of product titles,
Case 1: Title is the same
Case 2: Title is similar
After sorting them out,
I would like to output them into an excel file using pandas,
which contain id1 and id2 if Case 1 and Case 2 are satisfied.
Any thoughts on this problem?
new_list = [] for i in range(len(title1)): for j in range(len(title2)): r = [] title_distance = fuzz.token_sort_ratio(title1[i], title2[j]) if (title_distance > threshold): r.append(amazon_s['idAmazon'][i]) r.append(google_s['idGoogleBase'][j]) new_list.append(r) df = pd.DataFrame(new_list) df.to_csv('task.csv')title1 here is a list of product title from amazon website
title2 is a list of product title from google website
id1 is an id corresponding to amazon website product
id2 is an id corresponding to google website product
Both of them have a list of product titles,
Case 1: Title is the same
Case 2: Title is similar
After sorting them out,
I would like to output them into an excel file using pandas,
which contain id1 and id2 if Case 1 and Case 2 are satisfied.
Any thoughts on this problem?