I read this (How to create multiple dataframes from pandas groupby object) however, I still do not understand how to create my dataframes for each person after I create my grouped_persons group with groupby.
How to create multiple dataframes from pandas groupby object
What should I change in this code? I think this is part of my problem: 'df_'+ name +'1'
grouped_persons = df.groupby('Person')
for name, group in grouped_persons
'df_'+ name +'1' = df.loc[(df.Person == name) & (df.ExpNum == 1)]
File "", line 2 for name, group in grouped_persons ^ SyntaxError: invalid syntax