title: Replace column in Pandas dataframe with the mean of that column
body: <p>I have a dataframe:</p>
  
  <pre><code>df = pd.DataFrame([[1, 2], [1, 3], [4, 6]], columns=['A', 'B'])
  
     A  B
  0  1  2
  1  1  3
  2  4  6
  </code></pre>
  
  <p>I want to return a dataframe <strong>of the same size</strong> containing the mean of each column:</p>
  
  <pre><code>   A      B
  0  2  3.666
  1  2  3.666
  2  2  3.666
  </code></pre>
  
  <p>Is there a simple way of doing this?</p>