C1M4_Assignment Ex_2
I keep getting KeyError - the data type is List not Dictionary
I checked the data type of candy_data, and it is a list. But I can’t seem to move forward on this exercise, and I’m not sure where the problem is
START CODE HERE
Use ‘get_popularity_scores’ and pass in the lst candy_data
popularity_scores = # Add your code here
for row in candy_data[1:]:
score = get_popularity_scores(row[1])
popularity_scores.append(score)
END CODE HERE
Print the popularity_scores list
print_scores(popularity_scores)
