如何将每行的两个单元格转置为一个新列?

如何将每行的两个单元格转置为一个新列?

我从http://data.un.org/例如,当打开人口数据集时,我遇到了这种情况:

Region/Country/Area |   Colonna1 |  Year |  Series |    Value |
------------------------------------------------------------------------
380 Italy   2005    Population mid-year estimates (millions)    58.81
380 Italy   2005    Population mid-year estimates for males (millions)  28.61
380 Italy   2005    Population mid-year estimates for females (millions)    30.2
380 Italy   2005    Sex ratio (males per 100 females)   94.8
380 Italy   2005    Population aged 0 to 14 years old (percentage)  14.1
380 Italy   2005    Population aged 60+ years old (percentage)  25.1
380 Italy   2005    Population density  199.9
380 Italy   2010    Population mid-year estimates (millions)    59.73
380 Italy   2010    Population mid-year estimates for males (millions)  29.02
380 Italy   2010    Population mid-year estimates for females (millions)    30.71
380 Italy   2010    Sex ratio (males per 100 females)   94.5
380 Italy   2010    Population aged 0 to 14 years old (percentage)  14
380 Italy   2010    Population aged 60+ years old (percentage)  26.9
380 Italy   2010    Population density  203.1

但我想通过以下方式转换表格:

Region/Country/Area |   Colonna1 | Value | Population mid-year estimates (millions) | Population mid-year estimates for males (millions) |
Population mid-year estimates for females (millions) | ... 
    ------------------------------------------------------------------------
    380 |Italy  |2005   |58.81  |28.61  |30.2     | ...
    380 Italy   |2010   |       |       |         |

相关内容