Created
December 15, 2020 17:29
-
-
Save devamitranjan/ea08e17111b5cd98a89a170f0baaec05 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
import matplotlib.pyplot as plt | |
from sklearn.feature_extraction import text | |
from wordcloud import WordCloud | |
def generate_word_clouds(df): | |
allWords = ' '.join([twts for twts in df['Comments']]) | |
wordCloud = WordCloud(stopwords = text.ENGLISH_STOP_WORDS ,width=1000, height=600, random_state=21, max_font_size=110).generate(allWords) | |
plt.imshow(wordCloud, interpolation="bilinear") | |
plt.axis('off') | |
plt.show() | |
generate_word_clouds(df) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment