delimiters and csv files python -


i'm trying write csv file insert list (['a', 'b', 'c', 'd', 'e']) , puts each item of list single cell, instead of having 5 different cells each letter in it.

here's code:

output_file = open('output_results.csv', 'wb') writer = csv.writer(output_file, delimiter = ',', dialect = 'excel') writer.writerow(['a', 'b', 'c', 'd', 'e']) 

instead of printing out each letter in 1 cell, prints out a,b,c,d,e in 1 cell. seems delimiter not being used correctly? hoping have comma 1 separated each letter cell.

thanks help!

edit: i'm viewing resulting csv file in microsoft excel , i'm using python 2.7.8

there lots type of cvs notation. 1 of them use , , other use ; separete columns. tou can find more information following page. http://en.m.wikipedia.org/wiki/comma-separated_values#example


Comments

Popular posts from this blog

javascript - how to protect a flash video from refresh? -

android - Associate same looper with different threads -

visual studio 2010 - Connect to informix database windows form application -