title: How do I add headers to a PySpark DataFrame?
body: <p>I have created a PySpark RDD (converted from XML to CSV) that does not have headers. I need to convert it to a DataFrame with headers to perform some SparkSQL queries on it. I cannot seem to find a simple way to add headers. Most examples start with a dataset that already has headers.</p>
  
  <pre><code>    df = spark.read.csv('some.csv', header=True, schema=schema)
  </code></pre>
  
  <p>However, I need to append headers.</p>
  
  <pre><code>    headers = ['a', 'b', 'c', 'd']
  </code></pre>
  
  <p>This seems to be a trivial problem, I am not sure why I cannot find a working solution. Thank you.</p>