title: How to get key values from default dictionary in Python?
body: <p>I have a default dictionary with name df:</p>
  
  <pre><code>defaultdict(&lt;type 'int'&gt;, {u'DE': 1, u'WV': 1, u'HI': 1, u'WY': 1, u'NH': 2, u'NJ': 1, u'NM': 1, u'TX': 1, u'LA': 1, u'NC': 1, u'NE': 1, u'TN': 1, u'RI': 1, u'VA': 1, u'CO': 1, u'AK': 1, u'AR': 1, u'IL': 1, u'GA': 1, u'IA': 1, u'MA': 1, u'ID': 1, u'ME': 1, u'OK': 2, u'MN': 1, u'MI': 1, u'KS': 1, u'MT': 1, u'MS': 1, u'SC': 2, u'KY': 1, u'OR': 1, u'SD': 1})
  </code></pre>
  
  <p>how do I get the keys of this dictionary whose values are more than 1. </p>
  
  <p>If I do <code>[df[val] for val in df if df[val]&gt;1]</code> </p>
  
  <p>I get the output as <code>[2, 2, 2]</code></p>
  
  <p>If I print <code>[df.keys() for val in df if df[val]&gt;1]</code> Still I donot get the key values, I need the keys that has values more than 2 like this <code>['SC', 'OK', 'NH']</code>
  How do I do that??</p>