Member-only story

Word Cloud in 3 Basic Steps with Python

Gustavo R Santos
3 min readDec 23, 2021

Generate a word cloud to quickly analyze a text’s most frequent words.

Photo by engin akyurt on Unsplash

What is a Word Cloud

Word cloud is a well known tool used by Data Scientists to visually represent the text’s most important words with a single plot.

The representation is based on the frequency of the word in a text. So, the bigger the size of the word, the more that word appeared in the text. From the example below, I extracted a text from the Wikipedia and generated that plot.

If you take a quick look, the words data, science, statistics, information, computer pop to our eyes right away, giving us the message that those are the most important words in that text.

A word cloud is a visual representation of text data (...) Tags are usually single words, and the importance of each tag is shown with font size or color. [Wikipedia]

Word cloud generated from a text about Data Science. Image by the author.

To generate a word cloud in Python, that’s fairly easy.

I will show you how to do that if you have a text variable in your dataset. That’s…

--

--

Gustavo R Santos
Gustavo R Santos

Written by Gustavo R Santos

Data Scientist | I solve business challenges through the power of data. | Visit my site: https://gustavorsantos.me

No responses yet