Mission Link: https://app.dataquest.io/m/315/functions%3A-fundamentals/6/extract-values-from-any-column
Your Code: 'opened_file = open(‘AppleStore.csv’)
from csv import reader
read_file = reader(opened_file)
apps_data = list(read_file)
for row in apps_data[1:]:
value = row[index]
genres = extract(11)
Error: ‘genres is shorter than we expected.’
Question: why is the function not looping through all the lists in apps_data?
Hi @madebo013. I have a feeling the problem might be that the line
return column is indented too far, but I can’t tell because the code didn’t format properly when you copied it into the forums. If you could paste your code again between triple backticks (see this post to see what I mean), or take a screenshot, it will make it easier to see what the problem is and help you out. Thanks!