headers = ['id', 'year', 'activity', 'lineitem', 'datum']
with open('file3.csv', 'wb') as fou:
    output = csv.DictWriter(fou, delimiter=',', fieldnames=headers)
Why does CSV file contain a blank line in between each data line when outputting with Dictwriter in Python