title: How to iterate over all columns using pandas and save output to file
body: <p>I want to iterate over all of the columns in my dataset and discover if a column contains a one or a zero. </p>
  
  <p>My dataset is a matrix of 68x300000.</p>
  
  <p>I am reading the file using pandas:</p>
  
  <pre><code>df= pd.read_csv("filepath", header=None)
  </code></pre>
  
  <p>From this output I want to create a new matrix of 1x300000 detailing which column is a one or a zero.</p>
  
  <p>Is there a function which will allow me to do this? Which is the most efficient method? </p>