<human>:  Pythonically add header to a csv file
<bot>: Here is some code to add field names as headers in csv constructor `writer`

writer.writeheader()

#Warning: this code generation is experimental. Please inspect the code for any bugs before executing.