title: SettingWithCopyError for Pandas .mean()
body: <p>No error message with the demo code.</p>
  <pre><code>df = pd.DataFrame({'salary_1':[230,345,222],'salary_2':[235,375,292],'salary_3':[210,385,260]})
  df['average_1_3'] = df[['salary_1', 'salary_3']].mean(axis=1)
  </code></pre>
  <p>But when I work with my dataframe (80000 rows, 500 cols), I get <strong>SettingWithCopyError</strong>. Code is like</p>
  <pre><code>df_mine[&quot;mean&quot;] = df_mine[[&quot;Q177&quot;, &quot;Q178&quot;]].mean(axis=1)
  </code></pre>
  <p>Q177 and Q178 are two cols. Error:</p>
  <pre><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
  </code></pre>
  <p>I couldn't figure out the problem. Thank you for your help!</p>