0
我有熊猫一个数据帧如下:如何根据多指标指数水平得到子总大熊猫据帧
columns Year_1 Year_2
Idx_lvl_0 Idx_lvl_1
Cons. Prod_1 156 1541
Prod_2 312 2311
Del. Prod_1 23 12
Prod_2 0 4
问:我怎样才能大部(Cons_total和Del_total)根据Idx_lvl_0
为获得以下。
columns Year_1 Year_2
Idx_lvl_0 Idx_lvl_1
Cons. Prod_1 156 1541
Prod_2 312 2311
Cons_total 468 3852
Del. Prod_1 23 12
Prod_2 0 4
Del_total 23 16