Say I have a csv file:
Col1,Col2,Col3,Col4
1,2,3,4
1,2,3,4
1,2,3,4
1,2,3,4
I want to add all values in a column into an array then manipulate it, then on to the next column
So:
# loop through data
Col1 = [1,1,1,1]
# do something
Col2 = [2,2,2,2]
# do something
Col3 = [3,3,3,3]
# do something
Col4 = [4,4,4,4]
The problem with using
data = csv.reader(input_file)
lst = []
for row in data:
lst.append(row[0])
# do something with lst
Is that I can only do that for the first column.