title: Select columns in PySpark dataframe
body: <p>I am looking for a way to select columns of my dataframe in PySpark. For the first row, I know I can use <code>df.first()</code>, but not sure about columns given that they do <strong>not have column names.</strong></p>
  <p>I have 5 columns and want to loop through each one of them.</p>
  <pre><code>+--+---+---+---+---+---+---+
  |_1| _2| _3| _4| _5| _6| _7|
  +--+---+---+---+---+---+---+
  |1 |0.0|0.0|0.0|1.0|0.0|0.0|
  |2 |1.0|0.0|0.0|0.0|0.0|0.0|
  |3 |0.0|0.0|1.0|0.0|0.0|0.0|
  </code></pre>