Screen Link:
My Code:
reviews_max = {}
for app 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
What I expected to happen:
I expected the this code to run effectively without throwing errors
What actually happened:
---------------------------------------------------------------------------
ValueError Traceback (most recent call last)
<ipython-input-21-d174ce8ef281> in <module>
2 for app in android:
3 name = app[0]
----> 4 n_reviews = float(app[3])
5 if name in reviews_max and reviews_max[name] < n_reviews:
6 reviews_max[name] = n_reviews
ValueError: could not convert string to float: '3.0M'
I am working on my first project that have do with the google play store dataset and apple data set, but I am stuck at this code mentioned above