title: Trying to create a bag of words of Panda's df
body: <p>I am new to pandas (and somewhat new to Python) and am trying to create a bag of words for every row of a specific column. <a href="https://stackoverflow.com/questions/46360435/how-to-create-a-bag-of-words-from-a-pandas-dataframe">This</a> is where I took the code from and what follows is my attempt:</p>
  
  <pre><code>for index, row in df.iterrows():
      cell = df.Review2.iloc[index]
      df['BOW'].iloc[index] = pd.Series([y for x in cell for y in x.split()]).value_counts()
  </code></pre>
  
  <p>This is a single cell from my dataframe on which i'd like to perform the above operation (thus without the for loop for iterating on all the rows):</p>
  
  <blockquote>
    <p>problem price say discount 6 bottle even show reduce check changesfive
    star taste goodthis get best cabinet ever great crisp get best cabinet
    ever great crisp originally buy three bottle wind buy whole case
    holidaysnice california cab cab fantastic pleasantly surprise great
    fullbodied flavor 1 cent ship promotion decent</p>
  </blockquote>
  
  <p>Any help is greatly appreciated!</p>