summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Santos <dfsantosbu@unal.edu.co>2019-10-28 16:53:02 +0100
committerGitHub <noreply@github.com>2019-10-28 16:53:02 +0100
commit51a720b21c261e6f6b2f0f882ee835d9d97ab7ef (patch)
treed0277b009bd12789b80388f6507d2de3bd92325f
parent08a67595209a3fe6dc97d9f33ad5f9cf98bacc59 (diff)
parent20f51d0bc1b983170587aaf61012b1135b6d1d08 (diff)
downloadtablib-51a720b21c261e6f6b2f0f882ee835d9d97ab7ef.tar.gz
Merge pull request #416 from xdanielsb/doc-formats
Update doc, clarify the use and scope of the flag headers.
-rw-r--r--AUTHORS1
-rw-r--r--docs/tutorial.rst8
2 files changed, 8 insertions, 1 deletions
diff --git a/AUTHORS b/AUTHORS
index 503f580..8e54fe9 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -8,6 +8,7 @@ Here is a list of passed and present much-appreciated contributors:
Benjamin Wohlwend
Bruno Soares
Claude Paroz
+ Daniel Santos
Erik Youngren
Hugo van Kemenade
Iuri de Silvio
diff --git a/docs/tutorial.rst b/docs/tutorial.rst
index a9e46b4..2be7210 100644
--- a/docs/tutorial.rst
+++ b/docs/tutorial.rst
@@ -35,7 +35,7 @@ You can now start filling this :class:`Dataset <tablib.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 <tablib.Dataset>` object.
@@ -110,6 +110,12 @@ 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 <Dataset.csv>`, :class:`tsv <Dataset.tsv>`, :class:`dbf <Dataset.dbf>`, :class:`xls <Dataset.xls>` or :class:`xlsx <Dataset.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
--------------