Escape commas inside values while writing spark dataframes to csv

Viewed 3038

I am using df.write("csv") for writing my value set in Apache Spark.

By default it writes the values like :

1,abcded,"qwe,rr" i.e wraps in double quotes when there is a comma inside the value.

However, I want to escape the comma like qwe\\,rr and not get it wrapped by double quotes. Any ideas on how to achieve that?

2 Answers
Related