-
-
Save amankharwal/8986e3864bed5e885a19316076869666 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
total_emojis_list = list(set([a for b in messages_df.emoji for a in b])) | |
total_emojis = len(total_emojis_list) | |
total_emojis_list = list([a for b in messages_df.emoji for a in b]) | |
emoji_dict = dict(Counter(total_emojis_list)) | |
emoji_dict = sorted(emoji_dict.items(), key=lambda x: x[1], reverse=True) | |
for i in emoji_dict: | |
print(i) | |
emoji_df = pd.DataFrame(emoji_dict, columns=['emoji', 'count']) | |
import plotly.express as px | |
fig = px.pie(emoji_df, values='count', names='emoji') | |
fig.update_traces(textposition='inside', textinfo='percent+label') | |
fig.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment