I have imported a .csv file into Python and named it data. It looks something like this:
aK bK id
.124 .121 1
.320 .202 2
.222 .198 3
And so on for a few hundred rows. How do I convert column aK and column bK into lists? I have tried this:
aK = []
for row in data:
aK.append(row[0])
But aK is still a blank list.
csvmodule?aKis empty after the loop, post the actual code in question body.(Perhaps you consumed the file object before you passed it tocsv.reader)