I'm using PySpark to write a dataframe to a CSV file like this:
df.write.csv(PATH, nullValue='')
There is a column in that dataframe of type string. Some of the values are null. These null values display like this:
...,"",...
I would like them to be display like this instead:
...,,...
Is this possible with an option in csv.write()?
Thanks!
nullValue? If you remove the option, does it default to write nothing at all?nullValue. SettingnullValue=''was my first attempt to fix the problem, which didn't work.df.fillna('').write.csv(PATH)instead. Basically force all the null columns to be an empty string.