Arvind Krishnan Iyer created SPARK-26846:
--------------------------------------------
Summary: Empty Strings in dataframe are written as "" in CSV
Key: SPARK-26846
URL: https://issues.apache.org/jira/browse/SPARK-26846
Project: Spark
Issue Type: Bug
Components: SQL
Affects Versions: 2.4.0
Reporter: Arvind Krishnan Iyer
{code:java}
import spark.implicits._
val sc = spark.sparkContext
val df = Seq((8,"100","sfd"),(0,"","sfd"),(8, null,
"asfasd")).toDF("num","str_num","word").toDF().coalesce(1)
df.write.mode(SaveMode.Overwrite).csv("/Users/arvind.iyer/abcd.csv")
{code}
+Output+
8,100,sfd
0,"",sfd
8,"",asfasd
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]