title: Concat column values in a dataframe
body: <p>I have a csv file that looks like the following</p>
  <pre><code>name, state, a, b, c, d, ..., x
  Jon,  NY,    1, 4, 6, 2,      6
  Eric, CA,    5, 3, 1, 5,      6
  Chris,LA,    4, 4, 3, 1,      5
  </code></pre>
  <p>and I want the following result (one column with concat fields (inkl header name))</p>
  <pre><code>concate-fields
  &quot;name=Jon,   state=NY, a=1, b=4, c=6, d= 2, ... x=6&quot;
  &quot;name=Eric,  state=CA, a=5, b=3, c=1, d= 5, ... x=6&quot;
  &quot;name=Chris, state=LA, a=4, b=4, c=3, d= 1, ... x=5&quot;
  </code></pre>
  <p>There can be many headers from a...&gt;x so these should be appended in a generic way</p>
  <p>I now have</p>
  <pre><code>import org.apache.spark.sql.functions.{concat, lit}
  val lp = sample.select(concat(lit(&quot;name), $&quot;name&quot;, lit(&quot;,state=&quot;), $&quot;state&quot;)
  display(lp)
  </code></pre>
  <p>But I have trouble adding the same for column a-&gt;x (as this needs to be done in a generic way)</p>