title: How to apply multiple lambda functions for a single column?
body: <p>I'm working on a project where I'm would like to use 2 lambda functions to find a match in another column. I created a dummy df with the following code below:</p>
  <pre class="lang-py prettyprint-override"><code>df = pd.DataFrame(np.random.randint(0,10,size=(100, 4)), columns=list('ABCD'))
  </code></pre>
  <p>Now I would like to find column A matches in column B.</p>
  <pre class="lang-py prettyprint-override"><code>df['match'] = df.apply(lambda x: x['B'].find(x['A']), axis=1).ge(0)
  </code></pre>
  <p>Now I would like to add an extra check where I'm also checking if column C values appear in column D:</p>
  <pre class="lang-py prettyprint-override"><code>df['match'] = df.apply(lambda x: x['D'].find(x['C']), axis=1).ge(0)
  </code></pre>
  <p>I'm searching for a solution where I can combine these 2 lines of code that is a one-liner that could be combined with an '&amp;' operator for example. I hope this helps.</p>