title: Pandas, Multiple Case Statement, ValueError: either both or neither of x and y should be given
body: <p>Trying to incorporate the following case statement in my code.</p>
  
  <pre><code>d1['newcol'] = np.where((d1['business_name'] == 'HELP')&amp;(d1['level'] == 'Component'), d1['component'], np.where((d1['business_name'] == 'HELP')&amp;(d1['level'] == 'Package'),d1['package'], np.where(d1['business_name'] == 'PHELPS',d1['reporting']))) 
  </code></pre>
  
  <p>Or the case pseudocode would look like:</p>
  
  <pre><code>   newcol=case WHEN ((business_name = 'HELP' AND level = 'Component')) THEN component WHEN ((business_name = 'HELP' AND level = 'Package')) THEN package WHEN (business_name = 'PHELS') THEN reporting END
  </code></pre>
  
  <p>the error Im getting is:</p>
  
  <p><code>ValueError: either both or neither of x and y should be given</code></p>
  
  <p>any help would be appreciated.</p>