Writer classes¶
A FileWriteStep can be used with different Writers.
|
Write data to a comma-separated-values file. |
|
Write data to a new Excel (XLSX) spreadsheet file. |
|
Write data to a Javascript-Object-Notation file. |
|
A data writer class that prints() for testing purposes. |
CSVWriter¶
-
class
CSVWriter(filename, header=None, **kwargs)[source]¶ Write data to a comma-separated-values file.
-
__init__(filename, header=None, **kwargs)[source]¶ Create a new CSV writer instance.
- Parameters
filename (str) – The filename to write the file to.
header (str) – What to write in the first row, can be ‘key’ or ‘label.de’ etc. or nothing.
dialect (csv.Dialect) – A csv writing dialect, defaults to
csv.excel.quoting (int) – A quoting method, one of QUOTE_MINIMAL (0), QUOTE_ALL (1), QUOTE_NONNUMERIC (2) or QUOTE_NONE (3), defaults to
2.delimiter (str) – Overwrite dialect’s delimiter attribute, defaults to
';'.quotechar (str) – Overwrite dialect’s quotechar attribute, defaults to
'"'.encoding (str) – Encoding to use when writing the file, defaults to
'utf-8'.
-