title: Convert a column from pandas dataframe from float to int
body: <p>When I want to do the following command(learned from the other question), there is a warning. How to avoid this warning?</p>
  
  <pre><code>df['Class'] = df['Class'].astype(int)
  </code></pre>
  
  <p>/home/ubuntu/src/anaconda3/lib/python3.5/site-packages/ipykernel/<strong>main</strong>.py:2: 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>
    from ipykernel import kernelapp as app</p>