Test groupby with lists of indices