import wordcloud import pandas as pd import matplotlib.pyplot as plt # text = open(path.join(d, 'constitution.txt')).read() # # Generate a word cloud image # wordcloud = WordCloud().generate(text) # cloud = wordcloud.WordCloud(max_words = 2000, width = 1600,height = 900).generate(' '.join(data.Sentence)) # plt.figure(figsize=(20,12)) # plt.imshow(cloud) # plt.axis("off") # plt.savefig("WordCloudGoT.png") data = pd.read_excel('aruodas20210401.xlsx') cloud = wordcloud.WordCloud(max_words = 20, width = 1600,height = 900).generate(' '.join(data['Aprašymas'])) plt.figure(figsize=(20,12)) plt.imshow(cloud) plt.axis("off") plt.savefig("WordCloudGoT.png")
Preview:
downloadDownload PNG
downloadDownload JPEG
downloadDownload SVG
Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!
Click to optimize width for Twitter