title: Writing a RDD to a csv
body: <p>I have a RDD which is of the form </p>
  
  <pre><code>org.apache.spark.rdd.RDD[(String, Array[String])]
  </code></pre>
  
  <p>I want to write this into a csv file. Please suggest me how this can be done.</p>
  
  <p>Doing myrdd.saveAsTextFile on gives the output as below.</p>
  
  <pre><code>(875,[Ljava.lang.String;@53620618)
  (875,[Ljava.lang.String;@487e3c6c)
  </code></pre>