-
-
Save amankharwal/fcb5acb121178eab4d1d7f88713ee3d9 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def split_count(text): | |
emoji_list = [] | |
data = regex.findall(r'\X',text) | |
for word in data: | |
if any(char in emoji.UNICODE_EMOJI for char in word): | |
emoji_list.append(word) | |
return emoji_list | |
df['emoji'] = df["Message"].apply(split_count) | |
emojis = sum(df['emoji'].str.len()) | |
print(emojis) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment