我这样做
dec = df.groupby(pd.qcut(df.num,10)).mean()
dec.unstack=1
dnum = dec['num']
dnum
这会产生一个带有无标题列的结构:
num
(-0.001, 4.0] 1.807960
(4.0, 9.0] 7.008487
(9.0, 17.0] 13.341535
(17.0, 26.0] 21.971478
(26.0, 36.0] 31.369977
(36.0, 48.0] 42.212227
(48.0, 63.0] 55.994531
(63.0, 77.0] 70.219310
(77.0, 107.0] 90.825823
(107.0, 307.0] 143.040535
Name: num, dtype: float64
如何仅访问第二列,以便我获得一个系列
1.807960, 7.008487, etc. ?