title: pandas: Use if-else to populate new column
body: <p>I have a DataFrame like this:</p>
  
  <pre><code>col1       col2      
    1          0
    0          1
    0          0
    0          0
    3          3
    2          0
    0          4
  </code></pre>
  
  <p>I'd like to add a column that is a 1 if col2 is > 0 or 0 otherwise. If I was using R I'd do something like</p>
  
  <pre><code>df1[,'col3'] &lt;- ifelse(df1$col2 &gt; 0, 1, 0)
  </code></pre>
  
  <p>How would I do this in python / pandas?</p>