title: How to apply single condition to a list of columns in a dataframe and add value to 4th column without using multiple OR's
body: <p>I  need to apply a single condition to 3 columns of a dataframe and change value of 4th without using or statement .  </p>
  
  <p>I can do with <code>np.where</code> but if the no of columns is big it's going to take a lot of time </p>
  
  <pre><code>import pandas as pd
  import numpy as np
  
  df = pd.DataFrame({'a':[1,2,3,4],'b':[1,3,6,7],'c':[4,6,4,1], 'd':['p','f','p','u'],'e':['a','a','b','c']})
  
  df['d'] = np.where(df.a &gt; 4 | df.b &gt; 4 | df.c &gt; 4 , 'p',df['d']) 
  
  df = pd.DataFrame({'a':[1,2,3,4,5],'b':[1,3,6,7],'c':[4,6,4,1], 'd':['p','f','p','f']})
  df['d']=np.where(df.a &gt; 4 | df.b &gt; 4 | df.c &gt; 4 , 'p','f') 
  </code></pre>
  
  <p>I need someway of implementing same condition <code>&gt; , &lt;</code> to list of columns without using or for each.  </p>