title: Write spark dataframe to file using python and '|' delimiter
body: <p>I have constructed a Spark dataframe from a query. What I wish to do is print the dataframe to a text file with all information delimited by '|', like the following:</p>
  
  <pre><code>+-------+----+----+----+
  |Summary|col1|col2|col3|
  +-------+----+----+----+
  |row1   |1   |14  |17  |
  |row2   |3   |12  |2343|
  +-------+----+----+----+
  </code></pre>
  
  <p>How can I do this?</p>