In the above image, I colored some rows with the same colors, so I want to create new data frames with the values of the same color. as you can see, the values of the same color are the same as an example - 0.8 multiple and CE option type values rows, in this entire data frame these same values come in 2 times, so I want to create these 3 rows new data frame, and like the same i want to do for all rows.
1 Answer
Below is some code that may help you.
df_dictionary = dict(tuple(your_dataframe.groupby('columns_to_groupby')))
This will produce a dictionary whose keys are the grouped values (in your case, "CE, PE, etc...") and whose values are the dataframes split by the grouping specified. Hope this helps.
2 Comments
Krishna Gupta
Thank You. It's solved my problem.
ldmichae
Perfect, glad to hear that.
