title: Load CSV file with Spark
body: <p>I'm new to Spark and I'm trying to read CSV data from a file with Spark.
  Here's what I am doing :</p>
  <pre><code>sc.textFile('file.csv')
      .map(lambda line: (line.split(',')[0], line.split(',')[1]))
      .collect()
  </code></pre>
  <p>I would expect this call to give me a list of the two first columns of my file but I'm getting this error :</p>
  <blockquote>
  <p>File &quot;&quot;, line 1, in 
  IndexError: list index out of range</p>
  </blockquote>
  <p>although my CSV file as more than one column.</p>