Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- proposicoes[proposicoes['id'] == '465465']['ementa_token'].iloc[0]
- ['Comunica',
- 'Excelentíssimo',
- 'Senhor',
- 'Presidente',
- 'República',
- 'sanção',
- 'projeto',
- 'lei',
- 'Institui',
- 'Fundo',
- 'Nacional',
- 'Idoso',
- 'autoriza',
- 'deduzir',
- 'imposto',
- 'renda',
- 'devido',
- 'pessoas',
- 'físicas',
- 'jurídicas',
- 'doações',
- 'efetuadas',
- 'Fundos',
- 'Municipais',
- 'Estaduais',
- 'Nacional',
- 'Idoso',
- 'altera',
- 'Lei',
- 'nº',
- '9250',
- '26',
- 'dezembro',
- '1995',
- 'restitui',
- 'arquivo',
- 'Congresso',
- 'Nacional',
- 'dois',
- 'autógrafos',
- 'texto',
- 'ora',
- 'convertido',
- 'Lei',
- 'nº',
- '12213',
- '20',
- 'janeiro',
- '2010']
- from wordcloud import WordCloud
- import matplotlib.pyplot as plt
- %matplotlib inline
- wordcloud = WordCloud(width=800, height=400).generate(proposicoes['ementa_token'])
- plt.figure( figsize=(30,20) )
- plt.imshow(wordcloud)
- plt.axis("off")
- plt.show()
- ---------------------------------------------------------------------------
- TypeError Traceback (most recent call last)
- <ipython-input-18-c072e91a9fe7> in <module>
- ----> 1 wordcloud = WordCloud(width=800, height=400).generate(proposicoes['ementa_token'])
- 2 plt.figure( figsize=(30,20) )
- 3 plt.imshow(wordcloud)
- 4 plt.axis("off")
- 5 plt.show()
- c:usersreinaldodocumentscodepalavraslibsite-packageswordcloudwordcloud.py in generate(self, text)
- 603 self
- 604 """
- --> 605 return self.generate_from_text(text)
- 606
- 607 def _check_generated(self):
- c:usersreinaldodocumentscodepalavraslibsite-packageswordcloudwordcloud.py in generate_from_text(self, text)
- 584 self
- 585 """
- --> 586 words = self.process_text(text)
- 587 self.generate_from_frequencies(words)
- 588 return self
- c:usersreinaldodocumentscodepalavraslibsite-packageswordcloudwordcloud.py in process_text(self, text)
- 551 regexp = self.regexp if self.regexp is not None else r"w[w']+"
- 552
- --> 553 words = re.findall(regexp, text, flags)
- 554 # remove stopwords
- 555 words = [word for word in words if word.lower() not in stopwords]
- c:usersreinaldodocumentscodepalavraslibre.py in findall(pattern, string, flags)
- 221
- 222 Empty matches are included in the result."""
- --> 223 return _compile(pattern, flags).findall(string)
- 224
- 225 def finditer(pattern, string, flags=0):
- TypeError: expected string or bytes-like object
Add Comment
Please, Sign In to add comment