| 1 | initial version |
Another option is the use the csv package in python. You can write using this as follows. In the snippet below, info is a list of lists containing data that you want to write to a file.
import csv
info=[[1,2,3],[4,5,6]]
writefile = csv.writer(open(DATA+'myfile.csv', 'w'))
for i in range(0,len(info)):
writefile.writerow(info[i])
| 2 | No.2 Revision |
Another option is the use the csv package in python. You can write using this as follows. In the snippet below, info is a list of lists containing data that you want to write to a file.
import csv
info=[[1,2,3],[4,5,6]]
writefile = csv.writer(open(DATA+'myfile.csv', 'w'))
for i in range(0,len(info)):
writefile.writerow(info[i])
This will result in a .csv file that Excel can read.
Copyright Sage, 2010. Some rights reserved under creative commons license. Content on this site is licensed under a Creative Commons Attribution Share Alike 3.0 license.