change groupby objects to lists