-1
I have a sheet with 4 columns and 2 rows and I want to return the column age, without the column identifier, only the contents of the rows.
Code:
import csv
def get_column_of_csv(filename, column):
with open(filename) as stream:
reader = csv.DictReader(stream)
for row in reader:
yield row[column]
for name in get_column_of_csv('teste.csv', 'sobrenome'):
print(name)
Running the code displays this error:
Traceback (Most recent call last): File ... line 3, in from asyncore import file_wrapper Import: cannot import name 'file_wrapper' from 'asyncore' ... Does anyone know how to fix this mistake?