From 87d15a1529980fdc0dafc9ca350ef4ae9759ff06 Mon Sep 17 00:00:00 2001 From: Daniel Date: Sun, 27 Oct 2019 21:00:21 +0100 Subject: Update doc, clarify the use and scope of the flag headers. --- docs/tutorial.rst | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'docs/tutorial.rst') diff --git a/docs/tutorial.rst b/docs/tutorial.rst index a9e46b4..345ff88 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -35,7 +35,7 @@ You can now start filling this :class:`Dataset ` object with dat .. admonition:: Example Context - From here on out, if you see ``data``, assume that it's a fresh + From here on out, if you see ``data``, assume that it's a fresh :class:`Dataset ` object. @@ -110,6 +110,11 @@ Creating a :class:`tablib.Dataset` object by importing a pre-existing file is si This detects what sort of data is being passed in, and uses an appropriate formatter to do the import. So you can import from a variety of different file types. +.. admonition:: + + When the format is :class:`csv `, :class:`tsv `, :class:`dbf `, :class:`xls ` or :class:`xlsx `, and this does not have headers, the import should be done as follows :: + + imported_data = Dataset().load(open('data.csv').read(), headers=False) -------------- Exporting Data -------------- -- cgit v1.2.1 From 20f51d0bc1b983170587aaf61012b1135b6d1d08 Mon Sep 17 00:00:00 2001 From: Daniel Date: Mon, 28 Oct 2019 16:45:26 +0100 Subject: Update doc, apply requested changes in headers flag doc. --- docs/tutorial.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'docs/tutorial.rst') diff --git a/docs/tutorial.rst b/docs/tutorial.rst index 345ff88..2be7210 100644 --- a/docs/tutorial.rst +++ b/docs/tutorial.rst @@ -112,9 +112,10 @@ This detects what sort of data is being passed in, and uses an appropriate forma .. admonition:: - When the format is :class:`csv `, :class:`tsv `, :class:`dbf `, :class:`xls ` or :class:`xlsx `, and this does not have headers, the import should be done as follows :: + When the format is :class:`csv `, :class:`tsv `, :class:`dbf `, :class:`xls ` or :class:`xlsx `, and the data source does not have headers, the import should be done as follows :: imported_data = Dataset().load(open('data.csv').read(), headers=False) + -------------- Exporting Data -------------- -- cgit v1.2.1