I have a method that opens a CSV file but I would like to go directly to a specific column, I tried to do list2 = [row.split()[3] for row in f]
, but it returns a piece of the file, not the column. Is it possible to do this without using PANDAS?
My method:
import csv
list2 = []
count = 0
with open('meuarquivo.csv') as f:
list2 = [row.split()[3] for row in f]
while(count <= 20):
print(list2[count])
count+=1