ncvo / charity-commission-extract

Python utilities for handling the import of data from the Charity Commission data extract
43 stars 20 forks source link

Remove carriage return character from header row #4

Closed ayyess closed 7 years ago

ayyess commented 7 years ago

The CSV writer adds an extra carriage return (^M) character at the end of the header row. This interferes when loading the produced CSV files with Ruby. Setting lineterminator='\n' can ensure that the extra character isn't produced.

Tested with Python 3.5 on Linux.

[0] - http://stackoverflow.com/a/17725590