In [12]:
grouped = df.groupby(['FirstOrder', 'OrderPeriod'])