title: Pandas - check if a value exists in multiple columns for each row
body: <p>I have the following Pandas dataframe:   </p>
  
  <pre><code>Index  Name  ID1  ID2  ID3
      1  A     Y    Y    Y
      2  B     Y    Y        
      3  B     Y              
      4  C               Y
  </code></pre>
  
  <p>I wish to add a new column 'Multiple' to indicate those rows where there is a value Y in more than one of the columns ID1, ID2, and ID3.</p>
  
  <pre><code>Index  Name  ID1  ID2  ID3 Multiple
      1  A     Y    Y    Y   Y
      2  B     Y    Y        Y
      3  B     Y             N
      4  C               Y   N
  </code></pre>
  
  <p>I'd normally use <code>np.where</code> or <code>np.select</code> e.g.:</p>
  
  <pre><code>df['multiple'] = np.where(&lt;More than 1 of ID1, ID2 or ID3 have a Y in&gt;), 'Y', 'N')
  </code></pre>
  
  <p>but I can't figure out how to write the conditional. There might be a growing number of ID columns so I couldn't cover every combination as a separate condition (e.g. <code>(ID1 = Y and ID3 = Y) or (ID2 = Y and ID3 = Y)</code>. I think I perhaps want something which counts the Y values across named columns?</p>
  
  <p>Outside of Pandas I would think about working with a list, appending the values for each column where Y and then see if the list had a length of greater than 1.</p>
  
  <p>But I cant think how to do it within the limitations of <code>np.where</code>, <code>np.select</code> or <code>df.loc</code>.
  Any pointers?</p>