I'm looking for a way to get a list of all the keys in a GroupBy object, but I can't seem to find one via the docs nor through Google. There is definitely a way to access the groups through their keys, like so: df_gb = df.groupby(['EmployeeNumber']) df_gb.get_group(key) ...so I figure there's a way to access a list (or the like) of the keys in a GroupBy object. I'm looking for something like this: df_gb.keys Out: [1234, 2356, 6894, 9492] I figure I could just loop through the GroupBy object and get the keys that way, but I think there's got to be a better way. Continue reading...