Going fast! #DataquestChallenge Premium Annual Offer:
500 get 50% & the next 1000 get 40% off.
GET OFFER CODE

First Python Guided Project. Profitable app

https://app.dataquest.io/m/350/guided-project%3A-profitable-app-profiles-for-the-app-store-and-google-play-markets/14/next-steps

Profitable_app_python.ipynb (36.8 KB)

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

1 Like

Hi @Sowbarnikag
Welcome to the community and thanks for sharing your first project on Profitable Apps. Have gone through your project and I can affirm that the workings are so cool and well presented. The introduction has been well worked on, the comments , the explanations given in the mark down cell, the aim/objectives are so informing . Keep it up mate for the good work!
Have got fee humble suggestions to make;

  • Always consider adding the link of the dataset you are using, for easy access by the reader.
  • You ought to have included the conclusion( the findings in a summarized manner) at the end of your workings.
  • It’s always advisable to re-run your project for sequential ordering of the code cells.
  • I can see you first displayed the dataset after performing some cleaning process like the deletion , I think displaying some few rows before performing any work is the best approach .
  • Also I think you ought to have given a reason why you deleted row[10473], If you check keenly on the rating column, you will realize it’s indicated 19, which is wrong because ratings can’t exceed 5.

Otherwise, congratulations for having completed your first project. All the best in your upcoming projects.

Happy learning!

Hello man Good work.
But I have a question I am doing first project so I got error in one of the code I went through your project you were able to obtain correct results can you explain how you by passed that error.

Code part

Part Two

Let’s start by building the dictionary.

for app in android_apps[1:]:
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

Error

ValueError Traceback (most recent call last)
in
13 for app in android_apps[1:]:
14 name = app[0]
—> 15 n_reviews = float(app[3])
16
17 if name in reviews_max and reviews_max[name] < n_reviews:

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

if possible can you explain me how to remove this error.
Thank you

Hi, I know that you’ve posted this a couple of days ago. I just finished the first guided project. For this error, it means that there’s a character ‘M’ on your value that’s why python can’t convert the 3.0M to convert it to a float. What you can do here is use the method replace(), which will replace the the ‘M’. Like for example app[3].replace(‘M’,’’) which will replace the M with an empty string.

1 Like

You’re getting that error because that’s the invalid row from a previous exercise (row 10472), a few steps back you should have deleted that row.