title: Apply TfidfVectorizer in every row of dataframe that is a list of lists
body: <p>I have a pandas dataframe containing 2 columns and I want to use <code>sklearn TfidfVectorizer</code> for <strong>text-classification</strong> in one of them. However this column is a list of lists and TFIDF wants raw input as text. In <a href="https://stackoverflow.com/questions/50633153/how-can-i-use-a-list-of-lists-or-a-list-of-sets-for-the-tfidfvectorizer?rq=1">this question</a> they provide a solution in case we have just one list of lists, but I would like to ask how it would be possible to apply this function in every single row of my dataframe, which row contains a list of lists. Thank you in advance.</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-html lang-html prettyprint-override"><code>Input:
  
  0    [[this, is, the], [first, row], [of, dataframe]]
  1    [[that, is, the], [second], [row, of, dataframe]]
  2    [[etc], [etc, etc]]</code></pre>
  </div>
  </div>
  </p>
  
  <p>Wanted Output:</p>
  
  <pre><code>0    ['this is the', 'first row', 'of dataframe']
  1    ['that is the', 'second', 'row of dataframe']
  2    ['etc', 'etc etc']
  </code></pre>