DictWriter used
code slightly simplified
headers added in the file
Merge branch 'csv-export'