title: How to use map to select columns in RDD
body: <p>I have an RDD dataset of flights and I have to select specific columns from it.
  I have to select column numbers 9,4,5,8,17 and then create an sql dataframe with the results. The data is an RDD.</p>
  <p>I tried the following but I get an error in the map.</p>
  <pre><code>q9 = data.map(lambda x: [x[i] for i in [9,4,5,8,17]])
  sqlContext.createDataFrame(q9_1, ['Flight Num', 'DepTime', 'CRSDepTime', 'UniqueCarrier', 'Dest']).show(n=20)
  </code></pre>
  <p>What would you do? thanks!</p>