title: Pyspark writing data frame results into a text file
body: <p>I am trying to write data frame results in to  a text file and i am getting below error ,i am not understanding what exactly wrong with the datatypes</p>
  
  <p>Here are my  Dataframe results </p>
  
  <p><a href="https://i.stack.imgur.com/s0sjC.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/s0sjC.png" alt="enter image description here"></a></p>
  
  <p>I am using below code to write results into text file </p>
  
  <pre><code>User_cast.write.mode("overwrite").option("compression","bzip2").format("text").save("loc/path")
  </code></pre>
  
  <p>getting below error </p>
  
  <pre><code>pyspark.sql.utils.AnalysisException: u'Text data source does not support double data type.;'
  </code></pre>