title: pandas create one column equal to another if condition is satisfied
body: <p>I have two columns as below:</p>
  
  <pre><code>id, colA, colB
  0, a, 13
  1, a, 52
  2, b, 16
  3, a, 34
  4, b, 946
  etc...
  </code></pre>
  
  <p>I am trying to create a third column, <code>colC</code>, that is <code>colB</code> if <code>colA == a</code>, otherwise <code>0</code>.</p>
  
  <p>This is what I was thinking, but it does not work:</p>
  
  <pre><code>data[data['colA']=='a']['colC'] = data[data['colA']=='a']['colB']
  </code></pre>
  
  <p>I was also thinking about using <code>np.where()</code>, but I don't think that would work here.</p>
  
  <p>Any thoughts?</p>