Hello World,
I would to create One Dataframe per unique value from one column.
Below is my initial Dataframe.
Date Name Value
01/19 Jean 15
01/19 Jean 15
01/17 Bean 15
01/16 Bean 15
01/19 Jean 15
I have found some answers concerning the creation of dataframes based on unique values, such as : Create Pandas DataFrames from Unique Values in one Column.
With the following code, I am having everything within a list.
dfa = [x for _, x in df.groupby('name')]
dfa[0]
output
Date Name Value
01/19 Jean 15
01/19 Jean 15
01/19 Jean 15
Date Name Value
01/17 Bean 15
01/16 Bean 15
However, I would like to assign the name of dataframe automatically and not doing:
df_Jean= df[0]
df_Bean= df[1]
Below are the expected output
df_Jean
Date Name Value
01/19 Jean 15
01/19 Jean 15
01/19 Jean 15