title: How to efficiently create label columns out of existing columns without for loop and drop them afterwords
body: <p>I have a data frame looking like this:</p>
  
  <pre><code> A   B   C   D
   2   5   0   9
   2   0   8   0
   0   0   8   9
   2   0   8   0
   0   5   0   9
   2   0   8   9
   0   5   0   9  
   2   5   8   0
  </code></pre>
  
  <p>I want to check each value in a column and create a new one out of that column such that each row of the new column will be 1 if the value is greater 0 and 0 otherwise</p>
  
  <p>I did it using a for loop this way:</p>
  
  <pre><code> #Generate a data frame example
   df = pd.DataFrame(np.random.randint(5, size=(10, 8)), columns = ["A", "B", "C", "D", "E","F","G", "H"])
  
   # create a label out of it
   for label in df.columns.values:
       df['label_' + label] = df[label].apply(lambda a: 0  if  a==0 else 1)
       df.drop(label, axis=1) 
  </code></pre>
  
  <p>My questions are:</p>
  
  <p>1- How can I do the same task but without a for loop? </p>
  
  <p>2- How can I drop the columns after manipualting them? I already tried <code>.drop(label,
      axis=1)</code> but it did nto work</p>