title: Pandas: Adding a new column and values with a for loop
body: <p>I have a dataframe: df1, B column values are list in a list</p>
  <pre><code>df1 = pd.DataFrame({'A': ['aa', 'bb'], 
                  'B': [[[1,'cc'],[2,'aa']],[[3,'dd'],[4,'bb']]], 
                  'ADDED': [10, 20]})
  </code></pre>
  <p>and dataframe: df2</p>
  <pre><code>df2 =  pd.DataFrame({'id': [1, 2, 3, 4], 
                       'number': [55, 66, 77, 88]})                             
                        
      
  </code></pre>
  <p>I am trying to do string matching on column A and B</p>
  <pre><code>df3 = pd.DataFrame()
  for i,val in enumerate(df1['A'].values):
     for val2 in df1['B'][i]:
         score = fuzz.partial_ratio(val, val2)
         if score &gt; 99:
             df3 = df3.append(df2.loc[df2['id'] == val2[0], 'number'])
  </code></pre>
  <p>My result looks like this:</p>
  <pre><code>df3 = pd.DataFrame({'1': [66, 'NaN'], '3': ['NaN', 66]}, index=['number', 'number'])
    
  </code></pre>
  <p>Is there anyway to do this in an efficient way and the result would look like this: (added additional column from df1)</p>
  <pre><code>df4 = pd.DataFrame({'number': [66, 88], 'ADDED': [10, 20]})
  </code></pre>