title: The truth value of a Series is ambiguous python dataframe
body: <p>I am new to python pandas. I build a small function and now I always get the following error:</p>
  
  <blockquote>
    <p>The truth value of a Series is ambiguous. Use a.empty, a.bool(),
    a.item(), a.any() or a.all().</p>
  </blockquote>
  
  <p>I know that this error was already discussed in other question, however I do not really get what I should do different and how the error occurred.</p>
  
  <p>So this is my simple function:</p>
  
  <pre><code>def relativeWinner():
      if df['GoldSummer'] &gt;0 &amp; df['GoldWinter'] &gt;0:
          df['diff'] = abs(df['GoldSummer'] - df['GoldWinter'])/(df['GoldSummer'] + df['GoldWinter'])
      return df['diff'].idxmax()
  </code></pre>
  
  <p>Can anyone tell me whats wrong here and how i would fix it?</p>