postfalk / django-etl-sync

Django ETL deriving rules from models and forms
Other
27 stars 11 forks source link

Create Reader class for tabular data #26

Open postfalk opened 7 years ago

postfalk commented 7 years ago

I am thinking of a Reader class that would be able to parse tabular CSV data, such as

date, height, width, weight
1980-01-01, 34, 33, 93
1981-01-01, 38, 12, 30

into


[
    {"date": "1980-01-01", "measurement": "height", "value": 34},
    {"date": "1980-01-01", "measurement": "width", "value": 33},
    {"date": "1980-01-01", "measurement": "weight", "value": 93},
    {"date": "1981-01-01", "measurement": "height", "value": 38},
    {"date": "1981-01-01", "measurement": "width", "value": 12},
    {"date": "1981-01-01", "measurement": "weight", "value": 30}
]
postfalk commented 7 years ago

I used something similar to this in the navarro and the unimpaired projects.

postfalk commented 7 years ago

This exists in the Navarro project and could be easily merged into the main project. However, defer that for now for a clean 0.3.0 release