title: Fuzzy match strings in one column and create new dataframe using fuzzywuzzy
body: <p>I have the following dataframe:</p>
  
  <pre><code>df = pd.DataFrame(
      {'id': [1, 2, 3, 4, 5, 6], 
       'fruits': ['apple', 'apples', 'orange', 'apple tree', 'oranges', 'mango']
      })
     id      fruits
  0   1       apple
  1   2      apples
  2   3      orange
  3   4  apple tree
  4   5     oranges
  5   6       mango
  </code></pre>
  
  <p>I hope to find fuzzy strings in column <code>fruits</code> and get a new dataframe as follows, which ratio_score is higher than 80. </p>
  
  <p>How could do that in Python using fuzzywuzzy packages? Thanks. Please note <code>ratio_score</code> are a serie of values made-up as example.</p>
  
  <p>My solution:</p>
  
  <pre><code>df.loc[:,'fruits_copy'] = df['fruits']
  df['ratio_score'] = df[['fruits', 'fruits_copy']].apply(lambda row: fuzz.ratio(row['fruits'], row['fruits_copy']), axis=1) 
  </code></pre>
  
  <p>Expected result:</p>
  
  <pre><code>     id      fruits    matched_id     matched_fruits   ratio_score   
  0     1       apple        2                apples           95
  1     1       apple        4            apple tree           85     
  2     2      apples        4            apple tree           80   
  3     3      orange        5               oranges           95     
  4     6       mango         
  </code></pre>
  
  <p>Reference related:</p>
  
  <p><a href="https://stackoverflow.com/questions/40951029/fuzzy-matching-a-sorted-column-with-itself-using-python">Fuzzy matching a sorted column with itself using python</a></p>
  
  <p><a href="https://stackoverflow.com/questions/38577332/apply-fuzzy-matching-across-a-dataframe-column-and-save-results-in-a-new-column">Apply fuzzy matching across a dataframe column and save results in a new column</a></p>
  
  <p><a href="https://stackoverflow.com/questions/38977401/how-do-i-fuzzy-match-items-in-a-column-of-an-array-in-python">How do I fuzzy match items in a column of an array in python?</a></p>
  
  <p><a href="https://stackoverflow.com/questions/37891131/using-fuzzywuzzy-to-create-a-column-of-matched-results-in-the-data-frame">Using fuzzywuzzy to create a column of matched results in the data frame</a></p>