title: Comparing two values in a dataframe while iterating using iterrows
body: <p>When I run the code below, I get this error: 
  ValueError: ('The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().', 'occurred at index 0')</p>
  
  <pre><code>def execute_fnc(x):
      for index, row in df.iterrows():
  
          if df['first'] &lt; df['last']:
              df['a'] = False
              df['b'] = df['c']
          else:
              df['a'] = True
              df['b'] = df['c'] + df['last'] - df['first']
      return df
  
  
  df.apply(execute_fnc, axis=1)
  </code></pre>