Hello all!
I have a csv file which is usually has between 100 and 200 columns. I have a new column of data that I want to add to the csv file. I know if you open the file as "A" it will append the file, but I only know how to use it to add new rows to the document. not new columns.
Right now this code will write three columns of data:
Now assuming I have an array called "data" and I don't know how many columns are already written in the file, how can I add this new column to the file?
Thank you,
Ron Parker
I have a csv file which is usually has between 100 and 200 columns. I have a new column of data that I want to add to the csv file. I know if you open the file as "A" it will append the file, but I only know how to use it to add new rows to the document. not new columns.
Right now this code will write three columns of data:
Code:
myFile= open( "CC4.csv", "wb" ) wtr= csv.writer( myFile ) for blanka,s,q in zip(blanka,s,q): wtr.writerow([blanka,s,q]) myFile.close()
Thank you,
Ron Parker
Comment