title: Writing CSV file using Spark and scala - empty quotes instead of Null values
body: <p>I'm using spark 2.4.1 and scala,
  and trying to write DF to csv file.
  it seems that in case of null values ,the csv contains "".
  Is it possible to remove those empty quotes?</p>
  
  <pre><code> val data = Seq(
        Row(1, "a"),
        Row(5, "z"),
        Row(5, null)
      )
  
      val schema = StructType(
        List(
          StructField("num", IntegerType, true),
          StructField("letter", StringType, true)
        )
      )
  
      var df = spark.createDataFrame(
        spark.sparkContext.parallelize(data),
        schema
      )
    df.write.csv("location/")
  </code></pre>
  
  <p>The output seems like:</p>
  
  <pre><code>1,a
  5,z
  5,""
  </code></pre>
  
  <p>And I want it will be:</p>
  
  <pre><code>1,a
  5,z
  5,
  </code></pre>
  
  <p>What should I do?</p>
  
  <p>Thanks!</p>