By doing this command on my dataframe I get the following dataframe:
label = dataframe[['label', 'area']].groupby(['label']).describe()
print(label)
area
count mean std min 25% 50% 75% max
label
square 379.0 546.057942 728.552019 67.29 249.24 373.37 569.025 9772.17
triangle 179.0 439.527765 363.232426 66.61 259.03 360.22 496.545 3702.97
I would like simply this result:
label count mean std min 25% 50% 75% max
0 square 379.0 546.057942 728.552019 67.29 249.24 373.37 569.025 9772.17
1 triangle 179.0 439.527765 363.232426 66.61 259.03 360.22 496.545 3702.97
What can I do?
Also how to do the same thing if I apply to label the method .unstack(1)? To have another point of view. Thanks !