title: pyspark: groupby and aggregate avg and first on multiple columns
body: <p>I have a following sample pyspark dataframe and after groupby I want to calculate mean, and first of multiple columns, In real case I have 100s of columns, so I cant do it individually</p>
  <pre><code>sp = spark.createDataFrame([['a',2,4,'cc','anc'], ['a',4,7,'cd','abc'], ['b',6,0,'as','asd'], ['b', 2, 4, 'ad','acb'],
                          ['c', 4, 4, 'sd','acc']], ['id', 'col1', 'col2','col3', 'col4'])
  
  +---+----+----+----+----+
  | id|col1|col2|col3|col4|
  +---+----+----+----+----+
  |  a|   2|   4|  cc| anc|
  |  a|   4|   7|  cd| abc|
  |  b|   6|   0|  as| asd|
  |  b|   2|   4|  ad| acb|
  |  c|   4|   4|  sd| acc|
  +---+----+----+----+----+
  </code></pre>
  <p>This is what I am trying</p>
  <pre><code>mean_cols = ['col1', 'col2']
  first_cols = ['col3', 'col4']
  sc.groupby('id').agg(*[ f.mean for col in mean_cols], *[f.first for col in first_cols])
  </code></pre>
  <p>but it's not working. How can I do it like this with pyspark</p>