-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
What I am doing wrong #88
Comments
Hi, @wadebayo! This is the kind of question that's best to raise in the community. We don't closely monitor the issues on this repo, and there are many people (other students, and also Dataquest content authors and support staff) who can help you in the community! |
Closely look at the variable names in these lines: |
I confirm that there is a problem with the column app[3]; non number data could be found like "3.0M". How to clean such data? |
you must delete at row 10472 before |
What am I doing wrong? I get this output:
ValueErrorTraceback (most recent call last)
in ()
2 for app in google_data:
3 name = app[0]
----> 4 n_reviews = float(app[3])
5 if name in reviews_max and reviews_max[name]<n_reviews_max:
6 reviews_max[name]+=n_reviews
ValueError: could not convert string to float: 'Reviews'
when I run this code:
reviews_max = {}
for app in google_data:
name = app[0]
n_reviews = float(app[3])
if name in reviews_max and reviews_max[name]<n_reviews_max:
reviews_max[name]+=n_reviews
elif name not in reviews_max:
reviews_max[name]=n_reviews
print(reviews_max)
The text was updated successfully, but these errors were encountered: