How I could use pivot table Pandas as with group-bye

17 views Asked by At

I'm strugling to solve one issue with a dataframe that I have.

ID date x1 x2 x3
1 2023-09-01 25 50 56
1 2023-08-01 2 9 17

I have to transform my dataframe above for this model below:

ID date description values
1 2023-09-01 x1 25
1 2023-09-01 x2 50
1 2023-09-01 x3 56
1 2023-08-01 x1 2
1 2023-08-01 x2 9
1 2023-08-01 x3 17

Is it possible?

Imagine that we are working on a balance sheet (financial statements).......

Tks a lot

0

There are 0 answers