'Actual initialization, happens on the first entity being written.'

def __initialize_csv_writer(self, dictionary):

    write_header = self.print_export_header_row
    if self.from_header:
        export_column_list = tuple(dictionary)
    else:
        export_column_list = self.column_list
    self.csv_writer = UnicodeDictWriter(self.output_stream, export_column_list, self.csv_encoding, **self.export_options)
    if write_header:
        self.csv_writer.writerow(dict(zip(export_column_list, export_column_list)))
