title: Nested for loop using lambda function
body: <p>I have a nested for loop something like:</p>
  
  <pre class="lang-py prettyprint-override"><code>for x in df['text']:
    for i in x:
      if i in someList:
        count++
  </code></pre>
  
  <p>Where <code>df['text']</code> is a series of lists containing words such as <code>['word1', 'word2', 'etc']</code><br>
  I know I can just use the <code>for</code> format but I want to convert it into a lambda function.<br>
  I tried doing:<br>
  <code>df['in'] = df['text'].apply(lambda x: [count++ for i in x if i in someList])</code>
  but it is not proper syntax. How can I modify to get the function to what I desire? </p>