Split pandas dataframe based on groupby February 7, 2023 by Tarik gb = df.groupby('ZZ') [gb.get_group(x) for x in gb.groups]