Hi @st9540834 and welcome to the community! I changed the category for your post so that it appears in Q&A
rather than Share
since you have a question and aren’t quite ready to “share” your project yet.
It looks like you’re getting this error because of how you are assigning n_reviews
to the dictionary reviews_max
without using a key:
reviews_max = {}
for app in googlestore:
name = app[0]
n_reviews = float(app[3])
if name in reviews_max and reviews_max[name] < n_reviews:
reviews_max = n_reviews #this is the problem line!
elif name not in reviews_max:
reviews_max[name] = n_reviews
Can you see what you need to do to the above commented line of code? Let me know if you can’t see it and we can work on it together.