groupby(level=0) code example
Example 1: groupby as_index=false
When you use as_index=False , you indicate to groupby() that you don't want to set the column ID as the index (duh!). ... Using as_index=True allows you to apply a sum over axis=1 without specifying the names of the columns, then summing the value over axis 0.
Example 2: pandas get group
gp.get_group(key)