title: Spark SQLContext Query with header
body: <p>I'm using SQLContext to read in a CSV file like this:</p>
  
  <pre><code>val csvContents = sqlContext.read.sql("SELECT * FROM 
                    csv.`src/test/resources/afile.csv` WHERE firstcolumn=21")
  </code></pre>
  
  <p>But it's printing out the first column as <code>_c0</code> and including the header under it. How do I set the header and use the SQL query? I've seen this solution:</p>
  
  <pre><code> val df = spark.read
           .option("header", "true") //reading the headers
           .csv("file.csv")
  </code></pre>
  
  <p>But this doesn't allow me to do the <code>SELECT</code> query with the <code>WHERE</code> clause. Is there a way to specify a CSV header and do a <code>SQL SELECT</code> query?</p>