title: Python Pandas: How to groupby and compare columns
body: <p>Here is my datafarme 'df':</p>
  
  <pre><code>match           name                   group  
  adamant         Adamant Home Network   86   
  adamant         ADAMANT, Ltd.          86   
  adamant bild    TOV Adamant-Bild       86   
  360works        360WORKS               94   
  360works        360works.com           94
  </code></pre>
  
  <p>Per group number I want to compare the names one by one and see if they are matched to a same word from the 'match' column. </p>
  
  <p>So desired output will be counts:</p>
  
  <pre><code> If they match we count it as 'TP' and if not we count it as 'FN'.
  </code></pre>
  
  <p>I had an idea of counting number of match words per group number but that would not help completely with what I want:</p>
  
  <pre><code>df.groupby(group).count() 
  </code></pre>
  
  <p>Does any body have an idea how to do it?</p>