title: Setting values on a copy of a slice from a DataFrame
body: <p>I have a small dataframe, say this one :</p>
  
  <pre><code>    Mass32      Mass44  
  12  0.576703    0.496159
  13  0.576658    0.495832
  14  0.576703    0.495398    
  15  0.576587    0.494786
  16  0.576616    0.494473
  ...
  </code></pre>
  
  <p>I would like to have a rolling mean of column <code>Mass32</code>, so I do this:</p>
  
  <pre><code>x['Mass32s'] = pandas.rolling_mean(x.Mass32, 5).shift(-2)
  </code></pre>
  
  <p>It works as in I have a new column named <code>Mass32s</code> which contains what I expect it to contain but I also get the warning message:</p>
  
  <blockquote>
    <p>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 the caveats in the documentation:
    <a href="http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy" rel="noreferrer">http://pandas.pydata.org/pandas-docs/stable/indexing.html#indexing-view-versus-copy</a></p>
  </blockquote>
  
  <p>I'm wondering if there's a better way to do it, notably to avoid getting this warning message.</p>