Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/thulio/dict-to-csv
dict-to-csv transforms nested Python dictionaries into CSV lines.
https://github.com/thulio/dict-to-csv
csv csv-lines json python python-library python2 python3
Last synced: 2 months ago
JSON representation
dict-to-csv transforms nested Python dictionaries into CSV lines.
- Host: GitHub
- URL: https://github.com/thulio/dict-to-csv
- Owner: thulio
- License: mit
- Created: 2017-03-17T04:00:05.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2020-09-24T15:27:40.000Z (over 4 years ago)
- Last Synced: 2024-10-12T16:54:56.890Z (3 months ago)
- Topics: csv, csv-lines, json, python, python-library, python2, python3
- Language: Python
- Size: 11.7 KB
- Stars: 12
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# dict-to-csv
[![Build Status](https://travis-ci.org/thulio/dict-to-csv.svg?branch=master)](https://travis-ci.org/thulio/dict-to-csv)
dict-to-csv transforms nested Python dictionaries into CSV lines.
Example:
```json
[{
"customer": {
"name": "John",
"address": {
"street": "Street 1",
"number": "42"
}
},
"product": {
"sku": "1",
"price": 9.99
}
},
{
"customer": {
"name": "Bob",
"address": {
"street": "Street 2",
"number": "314"
}
},
"product": {
"sku": "2",
"price": 15.00
}
}
]
``````csv
customer.address.number,customer.address.street,customer.name,product.price,product.sku
42,Street 1,John,9.99,1
314,Street 2,Bob,15.0,2
```