I'm referring to https://github.com/pandas-dev/pandas/tree/main/doc/cheatsheet.
As you can see, if I use pivot()
, then all values are in row number 0 and 1.
But if I do use pivot()
, the result was different like below.
DataFrame before pivot()
:
DataFrame after pivot()
:
Is the result on purpose?