title: Storing list in a pandas DataFrame column
body: <p>I am trying to do some text processing using NLTK and Pandas. </p>
  
  <p>I have DataFrame with column 'text'. I want to add column 'text_tokenized' that will be stored as a nested list.</p>
  
  <p>My code for tokenizing text is: </p>
  
  <pre><code>def sent_word_tokenize(text):
      text = unicode(text, errors='replace')
      sents = sent_tokenize(text)
      tokens = map(word_tokenize, sents)
  
      return tokens
  </code></pre>
  
  <p>Currently, I am trying to apply this function as following:</p>
  
  <pre><code>df['text_tokenized'] = df.apply(lambda row: sent_word_tokenize(row.text), axis=1)
  </code></pre>
  
  <p>Which gives me error:</p>
  
  <pre><code>ValueError: Shape of passed values is (100, 3), indices imply (100, 21)
  </code></pre>
  
  <p>Not sure how to fix it and what is wrong here.</p>