title: Pandas still getting SettingWithCopyWarning even after using .loc
body: <p>At first, I tried writing some code that looked like this:</p>
  
  <pre><code>import numpy as np
  import pandas as pd
  np.random.seed(2016)
  train = pd.DataFrame(np.random.choice([np.nan, 1, 2], size=(10, 3)), 
                       columns=['Age', 'SibSp', 'Parch'])
  
  complete = train.dropna()    
  complete['AgeGt15'] = complete['Age'] &gt; 15
  </code></pre>
  
  <p>After getting SettingWithCopyWarning, I tried using.loc:</p>
  
  <pre><code>complete.loc[:, 'AgeGt15'] = complete['Age'] &gt; 15
  complete.loc[:, 'WithFamily'] = complete['SibSp'] + complete['Parch'] &gt; 0
  </code></pre>
  
  <p>However, I still get the same warning. What gives?</p>