Array Slicing In Python Using Pandas Groupby