Screen Link:
My Code:
cleaned_google = [] # Stores the data with no duplicates
already_added_google = [] # Will store the app names only
for row in apps_data_google:
name = row[0]
n_reviews = float(row[3])
if n_reviews == reviews_max[name] and name not in already_added_google:
cleaned_google.append(row)
already_added_google.append(name)
len(cleaned_google) #gives output of 9659
def string_check_englishApp(string):
non_ascii = 0
for character in string:
if ord(character) > 127:
non_ascii += 1
if non_ascii > 3 :
return False
else:
return True
google_english =[]
ios_english = []
for row in cleaned_google:
name = app[0]
if string_check_englishApp(name):
google_english.append(row)
for row in apps_data_ios:
name = row[1]
if string_check_englishApp(name):
ios_english.append(row)
explore_data(google_english, 0, 3, True)
print('\n')
explore_data(ios_english, 0, 3, True)
What I expected to happen:
To get a length of 9614 for english android apps
What actually happened:
['Photo Editor & Candy Camera & Grid & ScrapBook', 'ART_AND_DESIGN', '4.1', '159', '19M', '10,000+', 'Free', '0', 'Everyone', 'Art & Design', 'January 7, 2018', '1.0.0', '4.0.3 and up']
['U Launcher Lite – FREE Live Cool Themes, Hide Apps', 'ART_AND_DESIGN', '4.7', '87510', '8.7M', '5,000,000+', 'Free', '0', 'Everyone', 'Art & Design', 'August 1, 2018', '1.2.4', '4.0.3 and up']
['Sketch - Draw & Paint', 'ART_AND_DESIGN', '4.5', '215644', '25M', '50,000,000+', 'Free', '0', 'Teen', 'Art & Design', 'June 8, 2018', 'Varies with device', '4.2 and up']
Number of rows: 9659
Number of columns: 13
['284882215', 'Facebook', '389879808', 'USD', '0.0', '2974676', '212', '3.5', '3.5', '95.0', '4+', 'Social Networking', '37', '1', '29', '1']
['389801252', 'Instagram', '113954816', 'USD', '0.0', '2161558', '1289', '4.5', '4.0', '10.23', '12+', 'Photo & Video', '37', '0', '29', '1']
['529479190', 'Clash of Clans', '116476928', 'USD', '0.0', '2130805', '579', '4.5', '4.5', '9.24.12', '9+', 'Games', '38', '5', '18', '1']
Number of rows: 6183
Number of columns: 16
The cleaned data for android apps seems good but I am not sure why the English android apps does not seem to be filtered. Please advice.
Thanks