-
-
Save amankharwal/8f3ad453d1e82f0e071f44846b9c953a 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
stopwords = set(STOPWORDS) | |
words = '' | |
for review in df1.Review: | |
tokens = str(review).split() | |
tokens = [i.lower() for i in tokens] | |
words += ' '.join(tokens) + ' ' | |
wordcloud = WordCloud(width = 800, height = 800, | |
background_color ='white', | |
stopwords = stopwords, | |
min_font_size = 10).generate(words) | |
# plot the WordCloud image | |
plt.figure(figsize = (8, 8), facecolor = None) | |
plt.imshow(wordcloud) | |
plt.axis("off") | |
plt.tight_layout(pad = 0) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment