Most popular app by genre on google play

hi, i ran this code below and i am being skeptical on the output. i am having the feeling that the genre of each output is lesser than what i should expect, given the average result of the average number of output.

category_in_android_genre = freq_table(android_free_app, 1)

for category in category_in_android_genre:
total = 0
len_category = 0

for app in android_free_app:
    category_app = app[1]
    if category_app == category:            
        no_of_installs = app[5]
        no_of_installs = no_of_installs.replace(',', '')
        no_of_installs = no_of_installs.replace('+', '')
        no_of_installs = float(no_of_installs)
        total += no_of_installs
        len_category += 1

avg_no_of_installs = total / len_category
print(category_in_android_genre, ‘:’, avg_no_of_installs)
print(’\n’)
print(avg_no_of_installs)

my result below…

{‘SPORTS’: 3.396141261423897, ‘AUTO_AND_VEHICLES’: 0.9251946293580051, ‘HEALTH_AND_FITNESS’: 3.068938282748505, ‘TRAVEL_AND_LOCAL’: 2.335552296062281, ‘FOOD_AND_DRINK’: 1.241114746699763, ‘ENTERTAINMENT’: 1.0154575200270788, ‘NEWS_AND_MAGAZINES’: 2.798149610741284, ‘EVENTS’: 0.7108202640189552, ‘MEDICAL’: 3.5315355974275078, ‘MAPS_AND_NAVIGATION’: 1.399074805370642, ‘COMMUNICATION’: 3.2494640640866526, ‘DATING’: 1.8616721200496444, ‘COMICS’: 0.6205573733498815, ‘BEAUTY’: 0.5979916506826132, ‘FAMILY’: 18.740832675166423, ‘LIBRARIES_AND_DEMO’: 0.9364774906916393, ‘BOOKS_AND_REFERENCE’: 2.1437436533904997, ‘PRODUCTIVITY’: 3.8925871601038025, ‘SOCIAL’: 2.6627552747376737, ‘SHOPPING’: 2.245289405393208, ‘BUSINESS’: 4.580841701455489, ‘VIDEO_PLAYERS’: 1.771409229380571, ‘EDUCATION’: 1.241114746699763, ‘LIFESTYLE’: 3.9038700214374367, ‘PHOTOGRAPHY’: 2.944826808078529, ‘GAME’: 9.770957914927225, ‘WEATHER’: 0.8010831546880289, ‘TOOLS’: 8.462146000225657, ‘HOUSE_AND_HOME’: 0.8236488773552973, ‘ART_AND_DESIGN’: 0.6544059573507841, ‘FINANCE’: 3.7007785174320205, ‘PERSONALIZATION’: 3.317161232088458, ‘PARENTING’: 0.6544059573507841}

542603.6206896552

thank you for the prompt replies to this

1 Like

Hi @AjeleOluwaseunOlawal,

Can you please share with us your jupyter notebook file? This will help us to identify the issue quickly.

Thanks,
Sahil