title: Generate word cloud from single-column Pandas dataframe
body: <p>I have a Pandas dataframe with one column: Crime type. The column contains 16 different "categories" of crime, which I would like to visualise as a word cloud, with words sized based on their frequency within the dataframe.</p>
  
  <p><a href="https://i.stack.imgur.com/ywXTd.png" rel="noreferrer"><img src="https://i.stack.imgur.com/ywXTd.png" alt="enter image description here"></a></p>
  
  <p>I have attempted to do this with the following code:</p>
  
  <p>To bring the data in:</p>
  
  <pre><code>fields = ['Crime type']
  
  text2 = pd.read_csv('allCrime.csv', usecols=fields)
  </code></pre>
  
  <p>To generate the word cloud:</p>
  
  <pre><code>wordcloud2 = WordCloud().generate(text2)
  # Generate plot
  plt.imshow(wordcloud2)
  plt.axis("off")
  plt.show()
  </code></pre>
  
  <p>However, I get this error:</p>
  
  <pre><code>TypeError: expected string or bytes-like object
  </code></pre>
  
  <p>I was able to create an earlier word cloud from the full dataset, using the following code, but I want the word cloud to only generate words from the specific column, 'crime type' ('allCrime.csv' contains approx. 13 columns):</p>
  
  <pre><code>text = open('allCrime.csv').read()
  wordcloud = WordCloud().generate(text)
  # Generate plot
  plt.imshow(wordcloud)
  plt.axis("off")
  plt.show()
  </code></pre>
  
  <p>I'm new to Python and Pandas (and coding generally!) so all help is gratefully received.</p>