title: Aggregate over column arrays in DataFrame in PySpark?
body: <p>Let's say I have the following <code>DataFrame</code>:</p>
  
  <pre><code>[Row(user='bob', values=[0.5, 0.3, 0.2]),
  Row(user='bob', values=[0.1, 0.3, 0.6]),
  Row(user='bob', values=[0.8, 0.1, 0.1])]
  </code></pre>
  
  <p>I would like to <code>groupBy</code> <code>user</code> and do something like <code>avg(values)</code> where the average is taken over each index of the array <code>values</code> like this:</p>
  
  <pre><code>[Row(user='bob', avgerages=[0.466667, 0.233333, 0.3])]
  </code></pre>
  
  <p>How can I do this in PySpark?</p>