title: Python Pandas GroupBy get list of groups
body: <p>I have a line of code: </p>
  
  <pre><code>g = x.groupby('Color')
  </code></pre>
  
  <p>The colors are Red, Blue, Green, Yellow, Purple, Orange, and Black. How do I return this list? For similar attributes, I use x.Attribute and it works fine, but x.Color doesn't behave the same way.</p>