How to Solve NameError: name 'WordCloud' is not defined -- wordcloud
Solution: Import the 'WordCloud' module
To Solve the error, add the following line to the top of your code.
from wordcloud import WordCloud
For more information:
Python wordcloud WordCloud