title: Spark dataframe select a column from a row
body: <p>Hi I want to create a df with one column from a df with multiple columns. See this pseudo code:</p>
  
  <pre><code>df=[(id1,text),(id2,text2),...] //df where each row has two columns "id","text"
  id_column=df.map(row=&gt;row._1)
  </code></pre>
  
  <p>How can I do this in spark??</p>