您可以使用
pivot_table:
pd.pivot_table(df, values = 'Value', index=['Country','Year'], columns = 'Indicator').reset_index()
输出:
Indicator Country Year 1 2 3 4 5 0 Angola 2005 6 13 10 11 5 1 Angola 2006 3 2 7 3 6

您可以使用
pivot_table:
pd.pivot_table(df, values = 'Value', index=['Country','Year'], columns = 'Indicator').reset_index()
输出:
Indicator Country Year 1 2 3 4 5 0 Angola 2005 6 13 10 11 5 1 Angola 2006 3 2 7 3 6