title: SettingWithCopyWarning even when using .loc[row_indexer,col_indexer] = value
body: <p>This is one of the lines in my code where I get the <code>SettingWithCopyWarning</code>:</p>
  <pre><code>value1['Total Population']=value1['Total Population'].replace(to_replace='*', value=4)
  </code></pre>
  <p>Which I then changed to :</p>
  <pre><code>row_index= value1['Total Population']=='*'
  value1.loc[row_index,'Total Population'] = 4
  </code></pre>
  <p>This still gives the same warning. How do I get rid of it?</p>
  <p>Also, I get the same warning for a <strong>convert_objects(convert_numeric=True)</strong> function that I've used, is there any way to avoid that.</p>
  <pre><code> value1['Total Population'] = value1['Total Population'].astype(str).convert_objects(convert_numeric=True)
  </code></pre>
  <p><strong>This is the warning message that I get:</strong></p>
  <pre class="lang-none prettyprint-override"><code>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 the caveats in the documentation: http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy 
  </code></pre>