Hello everyone, I want to know how to go from panel data to time series. I have this dataset:

ID year cons

1 2008 19600
1 2010 24400
1 2012 29000
1 2014 24200
1 2016 16200
2 2008 9600
2 2010 15000
2 2012 13680
2 2014 15480
2 2016 18425
3 2008 17900
3 2010 18700

I would like to have it as:

year 1 2 3

2010 19600 9600 17900
2012 24400 15000 18700
2014 29000 .................
2016 ........................



Thank you a lot