我有以下数据:
state county age population
AL Autauga 5 2366
AL Autauga 1 3029
AL Autauga 2 3619
AL Autauga 7 3043
AL Autauga 3 3776
AL Autauga 15 1160
AL Autauga 12 2326
AL Baldwin 12 8365
AL Baldwin 4 9537
AL Baldwin 8 10753
我想将其转换为以下内容
state county age1pop age2pop age3pop age4pop age5pop age6pop...
AL Autauga 3029 3619 3776 0 2366 0
AL Baldwin 0 0 0 9537 0 0
即。我想将年龄行转换为单独的列