【发布时间】:2018-03-01 14:21:15
【问题描述】:
我一直在尝试了解 Pandas 的多索引方法。我正在尝试删除“std”子列,但徒劳无功。
如何做到这一点?
attribute attribute2 \
test1 std test2
d count type
r1 10 rx 0.559 (0.0) 0.559 (0.0) 0.568 (0.0)
sth1 0.653 (0.004) 0.653 (0.004) 0.679 (0.002)
sth2 0.584 (0.002) 0.584 (0.002) 0.586 (0.003)
sth3 0.651 (0.005) 0.651 (0.005) 0.676 (0
我想我似乎无法理解 https://pandas.pydata.org/pandas-docs/stable/generated/pandas.MultiIndex.drop.html 函数。
因此,生成的数据框应该只有两个平均列,没有“std” 非常感谢。
【问题讨论】: