I am trying to add a list to an existing csv file as a column. The code I currently have does add the list as a column to the file but to the bottom of the first column:
with open('test.csv', 'a', newline='') as csvfile:
writer = csv.writer(csvfile, dialect='excel')
writer.writerow([header])
for path in StimList:
writer.writerow([path])
Is there a way to tell the list/column being appended to the file to go in a specific column, e.g. the 5th column in the csv file like so:
column1 column2 column3 column4 column5
x a 1 4 StimList
y b 2 5 goes
z c 3 6 here