title: Rename or give alias to Python Spark dataframe column names
body: <p>I am using PySpark 2.4.3 and I have a dataframe that I wish to write to Parquet, but the column names have spaces, such as <code>Hour of day</code>.</p>
  
  <pre><code>df = spark.read.csv("file.csv", header=True)
  df.write.parquet('input-parquet/')
  </code></pre>
  
  <p>I am getting this error currently:</p>
  
  <pre><code>An error occurred while calling o425.parquet.
  : org.apache.spark.sql.AnalysisException: Attribute name "Hour of day" contains invalid character(s) among " ,;{}()\n\t=". Please use alias to rename it.;
  </code></pre>
  
  <p>How can I either rename the columns or give them aliases to be able to write to Parquet?</p>