toTsvStr
Convert DataFrame to TSV String
Converts this DataFrame to a TSV String.
Parameters you can use to customize the process include, for instance, delimiter, includeHeader, quoteMode, and headerComments. See the param list below for all settings.
The integration is built upon Apache Commons CSV.
Similar Functions
With overloads of DataFrame.writeTsv(), you can write TSV to File, Path, Appendable, or String.
For example, DataFrame.writeTsv("output.tsv")
or DataFrame.writeTsv(File("output.tsv"), quoteMode = QuoteMode.ALL)
Converting to a String can be done like this:
DataFrame.toTsvStr(delimiter = ",")
Parameters
The field delimiter character. Default: '\t'.
Ignored if hasFixedWidthColumns is true.
Whether to include the header in the output. Default: true.
The quote character. Default: ".
Used when field- or line delimiters should be interpreted as literal text.
For example: 123,"hello, there",456, would correspond to: 123; hello, there; 456.
The QuoteMode to use when writing CSV / TSV files. Default: QuoteMode.MINIMAL.
The escape character to use when writing CSV / TSV files with QuoteMode.NONE. Default: null. This will double-quote the value.
The character that indicates a comment line in a CSV / TSV file. Default: '#'.
A list of comments to include at the beginning of the CSV / TSV file. Default: empty list.
The character that separates records in a CSV / TSV file. Default: '\n', a Unix-newline.