I'm trying to
loop over multiple csv files,
extract information from them
- write an output into one new csv file with a row for each of the original files.
I take the information:
Name, Date, Time, Test, Navg, Percent
for each row.
I have tried to do it, however I have the problems:
- It writes each of Name, Date, Time, Test, Navg, Percent to a NEW ROW...I want each word in a new column
It writes each new file to the a new row underneath(I do want it underneath, but with each word in a column.
b = open('C:\Users\AClayton\Desktop\Data.csv', 'a') a = csv.writer(b,delimiter='\t',lineterminator='\n') a.writerows((Name, Date, Time, Test, Navg, Percent)) b.close()
Note the file has been read and the data extracted in earlier code.
writerow()instead ofwriterows().