pandas groupby produces dataframe or series. code example Example: seriesgroupby object g1['group'].apply(pd.DataFrame)