title: List of dictionary keys returning too slow?
body: <p>I am using the .groupby function in pandas and should have around 35k groups. I want to test if a certain value is in the list of group names, so I wrote the logical statement <code>if x in boxes.groups.keys()</code> (boxes is what i called my groups) and this statement takes incredibly long to process (over a minute and it didn't even finish before I stopped the code). Is this a bug? Is this happening because there are many groups? Is there another way to test this condition?</p>
  
  <p>Also, when I try to print a list of <code>boxes.groups.keys()</code> the code takes incredibly long too, so it seems like retrieving this list is where the time sink is.</p>