`#function to select entries and print only entries with max no. of reviews
def reviews_max(dataset):
empty_dictionary={}
for row in dataset[1:]:
name=row[0]
n_reviews=float(row[3])
if empty_dictionary[name] in empty_dictionary:
if empty_dictionary[name]<n_reviews:
empty_dictionary[name]=n_reviews
elif empty_dictionary[name] not in empty_dictionary:
empty_dictionary[name]=n_reviews
return empty_dictionary
print(reviews_max(dataset))
`
KeyError Traceback (most recent call last)
in
14 return empty_dictionary
15
—> 16 print(reviews_max(dataset))
17
in reviews_max(dataset)
6 n_reviews=float(row[3])
7
----> 8 if empty_dictionary[name] in empty_dictionary:
9 if empty_dictionary[name]<n_reviews:
10 empty_dictionary[name]=n_reviews
KeyError: ‘Photo Editor & Candy Camera & Grid & ScrapBook’