title: Pandas Dataframe - multiple values inside one cell?
body: <p>I'm working on an assignment and I'm having trouble with Pandas (finding it very different to the MATLAB I'm used to).
  I have a dataframe called 'main_DF' which has multiple columns (or series), one of these columns is called 'text-message'. I would like to take the text-message of each row, tokenize it into individual words and then place the list of those individual words into another column called 'text-message-tokens'.
  This is what I have at the moment:</p>
  
  <pre><code>main_DF = pd.DataFrame(columns=['text-message', 'Label']) # creating empty dataframe
  
  # filling with data
  main_DF = main_DF.append({'text-message': "I am happy", 'Label':"happy"}, ignore_index=True)
  main_DF = main_DF.append({'text-message': "I am sad", 'Label':"sad"}, ignore_index=True)
  
  # print
  print(main_DF)
  
  # Tokenizing text-message
  tokenize = CountVectorizer().build_tokenizer()
  
  # Add tokenized message to main_DF
  main_DF['text-message-tokens'] = tokenize(main_DF['text-message'][0]) # tokenize first row
  main_DF['text-message-tokens'] = tokenize(main_DF['text-message'][1]) # tokenize second row
  
  # print
  print(main_DF)
  </code></pre>
  
  <p>This results in the following</p>
  
  <p><a href="https://i.stack.imgur.com/itzTv.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/itzTv.png" alt="enter image description here"></a></p>
  
  <p>I would like it to be like this in the end,
  <a href="https://i.stack.imgur.com/3d7rM.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/3d7rM.png" alt="enter image description here"></a></p>