1
我有一個數據幀我想刪除的上限和下限值和替換與平均給出每個指標的上限和下限值如下查找每組值的熊貓數據幀的平均
df = pd.DataFrame(
{'indicator': ['indicator 1', 'indicator 1', 'indicator 2', 'indicator 2'],
'year':[2014,2014,2015,2015],
'value type': ['upper', 'lower', 'upper', 'lower'],
'value':[12.3, 10.2, 15.4, 13.2]
},
index=[1,2,3,4])
的兩個值。
我該怎麼做?