Question re: Guided Project 1- Analysis of Apps

Screen Link:


My Code:

reviews_max = {}

for apps in android:
    name = app[0]
    n_reviews = float(app[3])
    if name in reviews_max and reviews_max[name] < n_reviews:
        reviews_max[name] = n_reviews
    elif name not in reviews_max:
        reviews_max[name] = n_reviews

print('Expected Length:', len(android) - 1181)
print('Actual Length:', len(reviews_max))

I expected to see the Expected Length to equal the Actual Length of the Reviews Max Dictionary of 9659

What actually happened was I got an output of
Expected Length: 9659
Actual Length: 1

Hi @cameron_rex,

Your code looks ok.
To understand better the previous code, can you please share your notebook? Thanks.

Here is my Python Notebook for the first Guided Project; Analysis of the Apps in the App and Google Play Store.
Again, really could not have done this without the help from the Solution Notebook. There were a couple times where I got stuck and the Solution Notebook was able to help me out.

Guided Project_ Analyze App Store Games.ipynb (66.8 KB)

I am not sure how to show this as a hyperlink so that it can be viewed in a new tab within the web browser… :thinking:

Click here to view the jupyter notebook file in a new tab