title: Python pandas: Efficiently compare rows of a dataframe?
body: <p>I have dataframe 'dfm' :</p>
  
  <pre><code>match             group  
  adamant           86   
  adamant           86   
  adamant bild      86   
  360works          94   
  360works          94
  </code></pre>
  
  <p>where the 'group' column is the same, I want to compare the content of the 'match' column two by two and add the comparison results in another column 'result'. For instance expected result would be:</p>
  
  <pre><code>   group        compare                              result
      86      adamant, adamant                          same
      86      adamant, adamant bild                   not same
      86      adamant, adamant bild                   not same 
      94      360works,360works                         same
  </code></pre>
  
  <p>Can anybody help?</p>