0
query = 'Total replenishment lead time (in workdays)'
choices = ['PLANNING_TIME_FENCE_CODE', 'BUILD_IN_WIP_FLAG','Lead_time_planning',  
 'Total replenishment lead time 1','Total replenishment lead time  2']
print(process.extract(query, choices))

I want all the choices as my output that have maximum similarity ratio with the query. I want the following output--

[('Total replenishment lead time 1', 92), ('Total replenishment lead time  2', 92)]
Shijith
  • 4,602
  • 2
  • 20
  • 34
  • Does this answer your question? [Using Process.extract in fuzzywuzzy and the all max similar choices](https://stackoverflow.com/questions/65407585/using-process-extract-in-fuzzywuzzy-and-the-all-max-similar-choices) – maxbachmann Dec 28 '20 at 15:05
  • no, actually this is not working with my dataset. i am using a for loop for data as query and i have a dataset for choices. this is my code-- for i in df_2.SKU: ratio = process.extract( i, df.SKU, limit=None) i want to know what has to be done after this to get similar choices with maximum ratio, if two choices have same and maximum ratio i want both. – Lokesh Choraria Dec 29 '20 at 05:01
  • Well you can just place the code I wrote in a function and return the best matches from it. Still this is exactly the same question you asked there. So even when my answer does not solve your question, you should try to improve the original question instead of posting the same question again. – maxbachmann Dec 29 '20 at 12:49

0 Answers0