title: PySpark Dataframe Transpose as List
body: <p>I'm working with pyspark sql api, and trying to group rows with repeated values into a list of rest of contents.  It's similar to transpose, but instead of pivoting all values, will put values into array.</p>
  
  <p>Current output:</p>
  
  <pre><code>group_id | member_id | name
  55       | 123       | jake
  55       | 234       | tim 
  65       | 345       | chris
  </code></pre>
  
  <p>Desired output:</p>
  
  <pre><code>group_id | members
  55       | [[123, 'jake'], [234, 'tim']]
  65       | [345, 'chris']
  </code></pre>