Some key points

  • Suppose you have a DataFrame named as df, then df.groupby(‘param’) will create multiple groups based on the parameter you provide.

  • Each group is a DataFrame.

  • For each group, group[0] is the string of param, whereas group[1] is the group’s actual data in the form DataFrame.

How to get a specific group’s data

df …