title: python pandas: drop a df column if condition
body: <p>I would like to drop a given column from a pandas dataframe IF all the values in the column is "0%".</p>
  
  <p>my df:</p>
  
  <pre><code>data = {'UK': ['11%', '16%', '7%', '52%', '2%', '5%', '3%', '3%'],
          'US': ['0%', '0%', '0%', '0%', '0%', '0%', '0%', '0%'],
          'DE': ['11%', '16%', '7%', '52%', '2%', '5%', '3%', '3%'],
          'FR': ['11%', '16%', '7%', '52%', '2%', '5%', '3%', '3%']
          }
  dummy_df = pd.DataFrame(data, 
                          index=    ['cat1','cat2','cat3','cat4','cat5','cat6','cat7','cat8'], 
                          columns=['UK', 'US', 'DE', 'FR'])
  </code></pre>
  
  <p>my code so far:</p>
  
  <pre><code>dummy_df.drop(dummy_df == '0%',inplace=True)
  </code></pre>
  
  <p>I get a value error:</p>
  
  <pre><code>ValueError: labels ['UK' 'US' 'DE' 'FR'] not contained in axis
  </code></pre>