title: comparing values from one row to all other rows in pandas
body: <p>I want to compare a certain columns values from a single row against all other rows using pandas. i created the following loop but its taking forever to execute since my dataframe contain abt 400,000 row 
  is there a smarter/ faster way to execute this 
  sorry i'm not very python fluent im more used to coding in .NET languages</p>
  
  <p>my dataframe looks something like that : </p>
  
  <pre><code>    NAME            PROFILE URL             Final Addres
  0   ProfileA    appexample.co/userxyz       http://example.com
  1   ProfileB    appexample.co/userxyz_1     http://example.com  
  2   ProfileC    appexample.co/userabc       http://anotherexample.com
  3   ProfileD    appexample.co/userabc_3     http://anotherexample.com
  4   ProfileE    appexample.co/userjyl       http://example123.com
  
  
  </code></pre>
  
  <p>I am trying to identify duplicate (profiles) in this case (ProfileA  &amp; ProfileB) &amp; (ProfileC &amp; ProfileD) are duplicates because :
  1. have the same profile url (eg. user is in user &amp; user_1)
  2. have the same Final Address</p>
  
  <p>the current code im using :</p>
  
  <pre><code>possible_dup = []
      for row in test.iterrows():
      first = str(row[1]['PROFILE URL'])
      first_url = str(row[1]['Final Address'])
      for sec_row in test.iterrows():
          second = str(sec_row[1]['PROFILE URL'])
          second_url = str(sec_row[1]['Final Address'])
          if (row[1]['PROFILE URL'] == sec_row[1]['PROFILE URL']) :
              continue
          if ((first in second) and (first_url == second_url)):
              dup = '{} , {}'.format(first,second)
              possible_dup.append(dup)
  
  </code></pre>
  
  <p>the running time exceeded 24 hours and was still running , im using jupyter notebook </p>