#NEWLINE# def _dataframe_to_csv( writer , dataframe , delimiter , with_header ) : #NEWLINE# #INDENT# 'serialize the dataframe with different delimiters' #NEWLINE# encoding_writer = codecs . getwriter ( 'utf-8' ) ( writer ) #NEWLINE# dataframe . to_csv ( path_or_buf = encoding_writer , sep = delimiter , header = with_header , index = False )