GP:Profitable App Profiles for the App Store and Google Play Markets

Screen Link: https://app.dataquest.io/m/350/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/4/removing-duplicate-entries-part-one

Your Code: Enclose your code in 3 backticks ```andriod_clean=
already_added=

for app in andriod:
name=app[0]
n_review=float(app[3])
if (review_max[name]==n_review) and (name not in already_added):
andriod_clean.append(app)
already_added.append(name)

explore_data(andriod_clean, 0,3, True)```

What I expected to happen: list of clean apps

What actually happened: ```
ValueErrorTraceback (most recent call last)
in ()
4 for app in andriod:
5 name=app[0]
----> 6 n_review=float(app[3])
7 if (review_max[name]==n_review) and (name not in already_added):
8 andriod_clean.append(app)

ValueError: could not convert string to float: ‘3.0M’```

Other details: I am unsure how to proceed.

Hi @hostonmel
You can find an answer in this post https://community.dataquest.io/t/python-fundamentals-guided-project/171480/2?u=bahmed21

Thank you. I don’t know why I was thinking I had to use it.

You are welcome @hostonmel and Good luck on the rest of the project

Okay, so I solved the first issue. My next issue is that after I removed the duplicates I am not getting the same number of rows and column like in the solutions manual.
https://app.dataquest.io/m/350/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/6/removing-non-english-apps-part-one

for app in andriod:
    name=app[0]
    n_review=float(app[3])
    if name in reviews_max and reviews_max[name] < n_review:
        reviews_max[name]=n_review
    elif name not in reviews_max:
        reviews_max[name]= n_review
    

print('Expected lenghth:', len(andriod)-1181)

print('Actual lenghth:', len(reviews_max))```
Expected lenghth: 9659
Actual lenghth: 9659

```andriod_clean=[]
already_added=[]


for app in andriod:
    name=app[0]
    n_reviews=float(app[3])
    if (reviews_max[name]==n_review)  and (name not in already_added):
        andriod_clean.append(app)
        already_added.append(name)
      
explore_data(andriod_clean, 0, 3, True)```
['iHoroscope - 2018 Daily Horoscope & Astrology', 'LIFESTYLE', '4.5', '398307', '19M', '10,000,000+', 'Free', '0', 'Everyone', 'Lifestyle', 'July 25, 2018', 'Varies with device', 'Varies with device']


Number of rows: 1
Number of columns: 13

Hi @hostonmel,
You have just to replace n_reviews by n_review in

I am still on the same project. My numbers and order are different than in the solution, is that normal?
https://app.dataquest.io/m/350/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/9/most-common-apps-by-genre-part-one