title: Scala/Spark - How to get first elements of all sub-arrays
body: <p>I have the following DataFrame in a Spark (I'm using Scala):</p>
  
  <pre><code>[[1003014, 0.95266926], [15, 0.9484202], [754, 0.94236785], [1029530, 0.880922], [3066, 0.7085166], [1066440, 0.69400793], [1045811, 0.663178], [1020059, 0.6274495], [1233982, 0.6112905], [1007801, 0.60937023], [1239278, 0.60044676], [1000088, 0.5789191], [1056268, 0.5747936], [1307569, 0.5676605], [10334513, 0.56592846], [930, 0.5446228], [1170206, 0.52525467], [300, 0.52473146], [2105178, 0.4972785], [1088572, 0.4815367]]
  </code></pre>
  
  <p>I want to get a Dataframe with only first Ints of each sub-array, something like:</p>
  
  <pre><code>[1003014, 15, 754, 1029530, 3066, 1066440, ...]
  </code></pre>
  
  <p>Keeping hence only the <code>x[0]</code> of each sub-array x of the Array listed above.</p>
  
  <p>I'm new to Scala, and couldn't find the right anonymous map function.
  Thanks in advance for any help</p>