hello lovely community,
I hope to get your help. I am stuck with an easy task that turns out not to be trivial at all (what a surprise).
I have a large dataset with 2000 names of cities and their characteristics (population for different years, id, and so on).
The dataset looks like this: city1 id ...
I need them to look like the following panel structure:
year1 city1 ...
year2 city1 ...
year3 city1 ...
...
year1 city2 ...
year2 city2 ...
year3 city3 ...
...
What is the best way to do this?
Thank you so much x x
I hope to get your help. I am stuck with an easy task that turns out not to be trivial at all (what a surprise).

I have a large dataset with 2000 names of cities and their characteristics (population for different years, id, and so on).
The dataset looks like this: city1 id ...
I need them to look like the following panel structure:
year1 city1 ...
year2 city1 ...
year3 city1 ...
...
year1 city2 ...
year2 city2 ...
year3 city3 ...
...
What is the best way to do this?
Thank you so much x x
Comment