title: pandas error using df.astype
body: <p>I'm just trying to convert a column of numeric strings to ints. This is what I'm trying:</p>
  
  <pre><code>df.date = df.date.astype(np.int64)
  </code></pre>
  
  <p>But I'm getting the warning:</p>
  
  <blockquote>
    <p>/Users/austin/anaconda/lib/python3.5/site-packages/pandas/core/generic.py:2773:
    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</p>
    
    <p>See the caveats in the documentation:
    <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy" rel="nofollow noreferrer">http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy</a>
    self[name] = value</p>
  </blockquote>
  
  <p>Not sure what this means. I also tried:</p>
  
  <pre><code>df.date = df.date.apply(int)
  </code></pre>
  
  <p>And I get the same warning as above. </p>
  
  <p>Why doesn't this work and what's the proper way?</p>