Screen Link:
My Code:
This is the code of the function to check whether the app is an English app or not.
def is_english(string):
count = 0
for character in string:
if ord(character) > 127:
count += 1
if count > 3:
return False
else:
return True
print(is_english('Docs To Go™ Free Office Suite'))
print(is_english('Instachat 😜'))
print(is_english('爱奇艺PPS -《欢乐颂2》电视剧热播'))
What I expected to happen:
After removing the non-English apps, the number of rows should be:
For android app: 9614
For ios app: 6183
What actually happened:
For android app: 9659
For ios app: 7197
Below is the code I use to generate those numbers.
android_english = []
ios_english = []
for app in android_clean:
name = app[0]
if is_english(name) == True:
android_english.append(app)
for app in ios:
name = app[1]
if is_english(name) == True:
ios_english.append(app)
explore_data(android_english, 0, 3, True)
print('\n')
explore_data(ios_english, 0, 3, True)