title: Pandas Drop an Entire Column if All of the Values equal a Certain Value
body: <p>Let's say I have dataframes that looks like this:</p>
  <pre><code>df_one
          a     b     c
      0   dave   blue   NaN
      1   bill   red    NaN
      2   sally  green  Member
      3   Ian    Org    Paid
  
  df_two:
  
          a     b     c
      0   dave   blue   NaN
      1   bill   red    NaN
      2   sally  green  Member
  </code></pre>
  <p>The logic I am trying to implement is something like this:</p>
  <pre><code>If all of column C = &quot;NaN&quot; then drop the entire column 
  Else if all of column C = &quot;Member&quot; drop the entire column 
  else do nothing
  </code></pre>
  <p>Any suggestions?</p>
  <p><strong>Edit:</strong> Added Expected Output</p>
  <p>Expected Output if using on both data frames:</p>
  <pre><code>df_one
          a     b     c
      0   dave   blue   NaN
      1   bill   red    NaN
      2   sally  green  Member
      3   Ian    Org    Paid
  
  df_two:
  
          a     b    
      0   dave   blue 
      1   bill   red 
      2   sally  green
  </code></pre>
  <p>Edit #2: Why am I doing this in the first place?</p>
  <p>I am ripping text from a PDF file into placing into CSV files using the Tabula library.</p>
  <p>The data is not coming out in the way that I am hoping it would, so I am applying ETL concepts to move the data around.</p>
  <p>The final outcome would be for management to be able to open the final result into a nicely formatted Excel file.</p>
  <p>Some of the columns have part of the headers put into a separate row and things got shifted around for some reason while ripping the data out of the PDF.</p>
  <p>The headers look something like this:</p>
  <pre><code>Team     Type     Member    Contact
                     Count
  </code></pre>
  <p>What I am doing is checking an entire column for certain header values. If the entire column has a header value, I'm dropping the entire column.</p>