I have a DataFrame as below,
A B C G R X6 X8 Class
0 6 860.62 809.73 65.24 573 88.1326 0.2113 A
1 7 871.58 789.74 64.54 849 84.8057 0.2151 A
2 6 854.87 789.74 64.54 687 90.5386 0.2127 B
3 7 823.73 759.75 68.20 475 86.1053 0.2081 B
4 6 823.44 759.75 68.20 424 87.0283 0.2429 B
I want to extract data to new data set of respective class, i.e extract entire class A into one data frame ( 2 entries) & Class B into another data frame ( 3 entries )
I tried using groupby test_new.groupby('Class')
, this groups the entire dataset as per class, I would appreciate if someone helped to extract each class using dictionary.