I want to save data in a csv file
I wrote this code
chemin = 'D:/Documents/prg5/'
NomFic= 'Datamat'
filepath = chemin + NomFic + '.csv'
file = open(filepath,"wb")
cw=csv.writer(file)
cw.writerow(("ALL" "GP+G" "GAMMA.PRIME" "GP/G"))
for row in zip(choices0, PX, PA, C1*100):
row = "%s %.2f %.2f %.2f" % row
cw.writerow(row)
file.close()
I would like to have my file with four columns with the same width the first column is 'NI, 'Co', 'Ti'.. the others are numeric with two decimal