Worldcloud

PHOTO EMBED

Tue Apr 06 2021 20:30:27 GMT+0000 (UTC)

Saved by @doorsas #undefined

​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")
content_copyCOPY

http://localhost:8888/notebooks/Untitled2.ipynb?kernel_name