-
-
Notifications
You must be signed in to change notification settings - Fork 593
Open
Description
Hello,
I've been using tablib indirectly through records to produce some Excel reports from a database, and I've noticed that while I add my content in a specific order, when exporting, the order of the columns is not the same as I added.
Looking at the documentation of tablib -- if the examples are not merely illustrative -- this should be noticeable, as for instance, when exporting to JSON, YAML, and CSV, the output "columns" are re-ordered differently for each format:
>>> print data.json
[
{
"last_name": "Adams",
"age": 90,
"first_name": "John"
},
{
"last_name": "Ford",
"age": 83,
"first_name": "Henry"
}
]
>>> print data.yaml
- {age: 90, first_name: John, last_name: Adams}
- {age: 83, first_name: Henry, last_name: Ford}
>>> print data.csv
first_name,last_name,age
John,Adams,90
Henry,Ford,83I'd appreciate if this could be fixed in such way that output would always have the same structure as what was inputted.
Thanks
Metadata
Metadata
Assignees
Labels
No labels