Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/12817#discussion_r61679408
--- Diff: python/pyspark/sql/readwriter.py ---
@@ -663,6 +700,18 @@ def csv(self, path, mode=None, compression=None):
known case-insensitive shorten names (none,
bzip2, gzip, lz4,
snappy and deflate).
+ You can set the following CSV-specific options to deal with CSV
files:
+ * ``sep`` or ``delimiter`` (default ``,``): sets the single
character as a delimiter \
+ for each field and value.
+ * ``encoding`` or ``charset`` (default ``UTF-8``): decodes the
CSV files by the given \
+ encoding type.
+ * ``quote`` (default ``"``): sets the single character used
for escaping \
+ quoted values where the delimiter can be part of the value.
+ * ``escape`` (default ``\``): sets the single character used
for escaping quotes \
+ inside an already quoted value.
+ * ``header`` (default ``false``): writes the names of columns
as the first line.
+ * ``nullValue`` (default empty string): sets the string
representation of a null value.
--- End diff --
I am less sure that `empty string` is okay.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]