title: Appending Boolean Column in Panda Dataframe
body: <p>I am learning pandas and got stuck with this problem here.</p>
  
  <p>I created a dataframe that tracks all users and the number of times they did something.</p>
  
  <p>To better understand the problem I created this example:</p>
  
  <pre><code>import pandas as pd
  data = [
      {'username': 'me',  'bought_apples': 2, 'bought_pears': 0},
      {'username': 'you', 'bought_apples': 1, 'bought_pears': 1}
  ]
  df = pd.DataFrame(data)
  df['bought_something'] = df['bought_apples'] &gt; 0 or df['bought_pears'] &gt; 0
  </code></pre>
  
  <p>In the last line I want to add a column that indicates if they user has bought something at all.</p>
  
  <p>This error pops up:</p>
  
  <blockquote>
    <p>ValueError: The truth value of a Series is ambiguous. Use a.empty, a.bool(), a.item(), a.any() or a.all().</p>
  </blockquote>
  
  <p>I understand the point of ambiguity in panda's Series (<a href="https://stackoverflow.com/questions/21415661/logic-operator-for-boolean-indexing-in-pandas">also explained here</a>) but I could not relate it to the problem.</p>
  
  <p>Interestingly this works</p>
  
  <pre><code>df['bought_something'] = df['bought_apples'] &gt; 0
  </code></pre>
  
  <p>Can anyone help me?</p>