Screen Link:
My Code:
def is_english(dataframe):
for app in dataframe['App']:
number_of_letter = 0
for letter in app:
if ord(letter) > 127:
number_of_letter += 1
if number_of_letter > 3:
dataframe = dataframe.drop(dataframe[dataframe['App'] == app].index, inplace = True)
return dataframe
return dataframe
Hi, everyone. I am trying to use Pandas library to clean and analyze the App Store and Google Play data set (the same data set from the first Guided Project in Python module). I created a function (called āis_englishā) to identify any ānon-Englishā character in the appās name from the data set and remove these apps from the data set. In my code, Iām considering any app that has more than 3 characters with an order higher than 127 as a non-english app. The āAppā expression means the column āAppā from the dataset.
I donāt know if itās possible to use the built-in function āord()ā in this case and if the code line dataframe.drop(dataframe[dataframe[āAppā] == app].index is correct. It seems that the function is not working and it goes directly to the last return dataframe . Can anyone help me?