title: Converting Column of Dataframe to Seq[Columns] Scala
body: <p>I am trying to make the next operation:</p>
  
  <pre><code>var test = df.groupBy(keys.map(col(_)): _*).agg(sequence.head, sequence.tail: _*)
  </code></pre>
  
  <p>I know that the required parameter inside the agg should be a <code>Seq[Columns]</code>.</p>
  
  <p>I have then a dataframe "expr" containing the next:</p>
  
  <pre><code>sequences
  count(col("colname1"),"*")
  count(col("colname2"),"*")
  count(col("colname3"),"*")
  count(col("colname4"),"*")
  </code></pre>
  
  <p>The column sequence is of string type and I want to use the values of each row as input of the <code>agg</code>, but I am not capable to reach those.</p>
  
  <p>Any idea of how to give it a try?</p>