Skip to content

Instantly share code, notes, and snippets.

@Rafastoievsky
Created November 2, 2020 03:22
Show Gist options
  • Select an option

  • Save Rafastoievsky/7ac2fae8717904db1f6c00b1963cb5ab to your computer and use it in GitHub Desktop.

Select an option

Save Rafastoievsky/7ac2fae8717904db1f6c00b1963cb5ab to your computer and use it in GitHub Desktop.
Whatsapp group chat analysis: create new emojis column from messeges
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
chat["emoji"] = chat["Message"].apply(split_count)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment