The next process is: read in the first row, find the index (location) in this row of data that you are looking for, then use this index to pull data from the remaining rows.
Python offers a very useful csv.reader class to do all the reading, so it's pretty simple.
import csv filename = 'yourfilenamehere' column = 'Age' data = []
Note that the values ββwill be displayed as strings. You can convert to int, wrapping row[idx] for example. data.append( int( row[idx] ) )
source share