title: Pandas Dataframe Series : check if specific value exists
body: <p>I need to iterate over a list and perform a specific operation if the value from the list exists in one of the pandas dataframe column. I tried to do as below, but getting below error </p>
  
  <p>'<strong>Error</strong>: #The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().'</p>
  
  <pre><code>import pandas as pd
  
  people = {
      'fname':['Alex','Jane','John'],
      'age':[20,15,25],
      'sal':[100,200,300]
  }
  
  df=pd.DataFrame(people)
  
  check_list=['Alex','John']
  
  for column in check_list:
      if (column == df['fname']):
          df['new_column']=df['sal']/df['age']
      else:
          df['new_column']=df['sal']
  
  df
  </code></pre>
  
  <p><strong>Required output</strong>:</p>
  
  <pre><code>fname   age sal new_column
  Alex    20  100  5      &lt;&lt;-- sal/age
  Jane    15  200  200    &lt;&lt;-- sal as it is
  John    25  300  12     &lt;&lt;-- sal/age
  </code></pre>