title: Dropping columns on a dataframe based on their count of values
body: <p>Hi I am new to pandas and struggling with a manipulation.
  I have a dataframe df with a huge number of columns, and I only want to keep the number of columns that have a count of above 5000 values.</p>
  <p>I tried the loop below but it does not work. Is there any easy way to do this? Also is there a function I could create to apply this to any dataframe where I want to keep columns with only n values or more?</p>
  <pre><code>for column in df.columns: 
     if df[column].count() &gt; 5000: 
        column = column
     else: 
        df[column].drop()
  </code></pre>
  <p>Thanks</p>