Hi,
I have the following dataset:
city period gasprice houseprice
1 1 2020 1.324549 183661.6
2 2 2020 2.197691 193749.0
3 3 2020 3.808314 193965.1
4 1 2021 2.455753 194041.6
5 2 2021 1.776679 196797.6
6 3 2021 2.384569 198689.6
I would like this dataset to be like this:
city gasprice_2020 houseprice_2020 gasprice_2021 houseprice_2021
1 1 1.324549 183661.6 2,4555753 194041.6
2 2 2.197691 193749.0 1.776679 196797.6
3 3 3.808314 193965.1 2.384569 198689.6
Would be nice if someone knew how to solve this.