Using python, i am writing data from a list to a .csv file, row-wise.
Code:
writer=csv.writer(open(filepath,\'wb\'))
header=[\'type\',\'id\',\'numbe
This work for me:
for item in RESULTS:
wr.writerow([item,])
Change writer.writerow(data)
to writer.writerow([data])
.
.writerow
takes an iterable and uses each element of that iterable for each column. If you use a list with only one element it will be placed in a single column.
You should also restructure your loop:
for word in header:
writer.writerow([word])