title: Drop columns in a pandas dataframe based on the % of null values
body: <p>I have a dataframe with around 60 columns and 2 million rows. Some of the columns are mostly empty. 
  I calculated the % of null values in each column using this function.</p>
  
  <pre><code>def missing_values_table(df): 
      mis_val = df.isnull().sum()
      mis_val_percent = 100 * df.isnull().sum()/len(df)
      mis_val_table = pd.concat([mis_val, mis_val_percent], axis=1)
      mis_val_table_ren_columns = mis_val_table.rename(
      columns = {0 : 'Missing Values', 1 : '% of Total Values'})
      return mis_val_table_ren_columns
  </code></pre>
  
  <p>Now I want to drop the columns that have more than 80%(for example) values missing. I tried the following code but it does not seem to be working.</p>
  
  <pre><code>df = df.drop(df.columns[df.apply(lambda col: col.isnull().sum()/len(df) &gt; 0.80)], axis=1)
  </code></pre>
  
  <p>Thank you in advance. Hope I'm not missing something very basic</p>
  
  <p>I receive this error</p>
  
  <blockquote>
    <p>TypeError: ("'generator' object is not callable", u'occurred at index
    Unique_Key')</p>
  </blockquote>