Hello, i want some help. in the first guided project i faced a problem in the data set of the google play data set.
reviews_max={}
for row in googleplay_data[1:]:
name= row[0]
n_reviews=float(row[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
ValueError: could not convert string to float: ‘3.0M’
The reason you’re getting an error is because one of the rows has a mistake. Instead of having a number at row[3], it has '3.0M'. Because it contains a letter, it’s not able to convert it to a float. Once the row with the mistake is deleted, then you should be able to try your code again.