title: Returning corresponding row based on fuzzywuzzy ratio
body: <p>I'm using fuzzy wuzzy to compare two columns in two different dataframes. I'd like to retrieve a corresponding value in the same row but different column within df2. For example:</p>
  
  <p>If i in df1 column A has a match ratio of more than 50 with df2 column A, I'd like to retrieve the corresponding value in df2 column B. </p>
  
  <p>my current code:</p>
  
  <pre><code>import pandas as pd
  import numpy as np
  from fuzzywuzzy import fuzz
  from fuzzywuzzy import process
  df1=pd.read_csv('C:\\Users\\nkurdob\\Desktop\\Sheet1.csv')
  df2=pd.read_csv('C:\\Users\\nkurdob\\Desktop\\Sheet2.csv')
  
  
  for i in range(len(df1)):
      em = df1['A'][i]
      test = fuzz.partial_ratio(em, df2['A']) 
      while test &gt; 50:
          print df1['Fund Name'][i]==df2['B']
  </code></pre>
  
  <p>This goes into a never ending output - I have to stop it every time. Does anyone know how to retrieve the corresponding row in df2 based on a certain match ratio?</p>
  
  <p>Thanks
  Nazar</p>