title: applying lambda row on multiple columns pandas
body: <p>I am creating a sample dataframe:</p>
  
  <pre><code>tp = pd.DataFrame({'source':['a','s','f'], 
                     'target':['b','n','m'], 
                     'count':[0,8,4]})
  </code></pre>
  
  <p>And creating a column 'col' based on condition of 'target' column >> same as source, if matching condition, else to a default, as below:</p>
  
  <pre><code>tp['col'] = tp.apply(lambda row:row['source'] if row['target'] in ['b','n'] else 'x')
  </code></pre>
  
  <p>But it's throwing me this error: <code>KeyError: ('target', 'occurred at index count')</code></p>
  
  <p>How can I make it work, without defining a function?</p>