summaryrefslogtreecommitdiff
path: root/docs/formats.rst
diff options
context:
space:
mode:
authorClaude Paroz <claude@2xlibre.net>2019-11-14 17:08:51 +0100
committerHugo van Kemenade <hugovk@users.noreply.github.com>2019-11-14 18:08:51 +0200
commitce7d887adc753de33812fe5eb88a1f30be396a6e (patch)
tree07d9e5a10accb9f30e7d23dedca176671f2386be /docs/formats.rst
parent57a535f577379214f415a8deee5fa2ab2c5f2415 (diff)
downloadtablib-ce7d887adc753de33812fe5eb88a1f30be396a6e.tar.gz
Documented csv import/export options from standard lib (#431)
Diffstat (limited to 'docs/formats.rst')
-rw-r--r--docs/formats.rst8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/formats.rst b/docs/formats.rst
index 489f57a..42b8cd5 100644
--- a/docs/formats.rst
+++ b/docs/formats.rst
@@ -21,6 +21,14 @@ When exporting with the ``csv`` format, the top row will contain headers, if
they have been set. Otherwise, the top row will contain the first row of the
dataset.
+When importing a CSV data source or exporting a dataset as CSV, you can pass any
+parameter supported by the :py:func:`csv.reader` and :py:func:`csv.writer`
+functions. For example::
+
+ tablib.import_set(your_data_stream, format='csv', dialect='unix')
+
+ dataset.export('csv', delimiter=' ', quotechar='|')
+
.. admonition:: Line endings
Exporting uses \\r\\n line endings by default so, make sure to include