I have the following code from multiple CSV files:
import pandas as p
import csv
csv_list=['interview1.csv', 'interview2.csv', ...]
for itw in csv_list:
df = p.read_csv(itw)
df.to_csv('out.csv', mode='a')
Right now it adds everything to the new CSV file in one long column. How would I move to a new column after each CSV file is read in order to have multiple columns in the one output file? Essentially I would like each input file to be one column in a single output file.
All csv files have multiple columns, but I can add usecols = [6] for them to get the column I need. All CSVs have the same number of lines.