title: How to get mean of column of np.arrays every n rows, and then add mean to new column for each member of group
body: <p>I have a df of np.arrays like this:</p>
  <pre><code>x           y    
  0      [2,0,1]
  1      [0,0,4]
  2      [0,0,1]
  3      [2,0,2]
  4      [1,0,1]
  5      [0,0,2]
  6      [0,1,1]
  7      [0,0,0]
  8      [0,0,1]
  </code></pre>
  <p>I want to get the mean array element-wise, I imagine using something like np.mean(x, axis=0) of ever 3 rows. The means should look like this:</p>
  <pre><code>       [.66,   0,    2]
         [  1,   0, 1.66]
         [. 0, .33,  .66]
  </code></pre>
  <p>I then want to add the mean for each group to a new column where the value repeats for each row member in the group. It should look like this:</p>
  <pre><code>x           y    
  0      [2,0,1]       [.66,   0,    2]
  1      [0,0,4]       [.66,   0,    2]
  2      [0,0,1]       [.66,   0,    2]
  3      [2,0,2]       [  1,   0, 1.66]
  4      [1,0,1]       [  1,   0, 1.66]
  5      [0,0,2]       [  1,   0, 1.66]
  6      [0,1,1]       [. 0, .33,  .66]
  7      [0,0,0]       [. 0, .33,  .66]
  8      [0,0,1]       [. 0, .33,  .66]
  
  </code></pre>