mirror of
https://github.com/kennethreitz/tablib.git
synced 2026-06-05 06:56:13 +00:00
Update doc, clarify the use and scope of the flag headers.
This commit is contained in:
@@ -8,6 +8,7 @@ Here is a list of passed and present much-appreciated contributors:
|
|||||||
Benjamin Wohlwend
|
Benjamin Wohlwend
|
||||||
Bruno Soares
|
Bruno Soares
|
||||||
Claude Paroz
|
Claude Paroz
|
||||||
|
Daniel Santos
|
||||||
Erik Youngren
|
Erik Youngren
|
||||||
Hugo van Kemenade
|
Hugo van Kemenade
|
||||||
Iuri de Silvio
|
Iuri de Silvio
|
||||||
|
|||||||
+6
-1
@@ -35,7 +35,7 @@ You can now start filling this :class:`Dataset <tablib.Dataset>` object with dat
|
|||||||
|
|
||||||
.. admonition:: Example Context
|
.. 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.
|
:class:`Dataset <tablib.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.
|
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 this does not have headers, the import should be done as follows ::
|
||||||
|
|
||||||
|
imported_data = Dataset().load(open('data.csv').read(), headers=False)
|
||||||
--------------
|
--------------
|
||||||
Exporting Data
|
Exporting Data
|
||||||
--------------
|
--------------
|
||||||
|
|||||||
Reference in New Issue
Block a user