title: Pandas function taking too long
body: <p>I am trying to extract the top level URLs and ignore the paths. I am using the code below:</p>
  
  <pre><code>for row in Mexico['Page URL']:
      parsed_uri = urlparse( 'http://www.one.com.mx/furl/Conteúdo Raiz/Meu' )
      Mexico['SubDomain'] = '{uri.scheme}://{uri.netloc}/'.format(uri=parsed_uri)
  </code></pre>
  
  <p>This script has been running for the past hour. When I ran it, it gave the following warning:</p>
  
  <pre><code>/anaconda/lib/python3.6/site-packages/ipykernel_launcher.py:3: SettingWithCopyWarning: 
  A value is trying to be set on a copy of a slice from a DataFrame.
  Try using .loc[row_indexer,col_indexer] = value instead
  
  See the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy
    This is separate from the ipykernel package so we can avoid doing imports until
  </code></pre>
  
  <p>I would appreciate it if anyone could advise on a quicker way, perhaps pointers on the method the 'warning' suggests</p>