I have a table :
When I try to pivot in python:
df.pivot(columns = 'Type', values = 'Value')
it returns only columns from Type column with values but columns Col1-Col5 do not appear in my dataframe
In Power Query it's achieved very simple, I just choose column I want to pivot and values for this column:
And after this operation I get following result:
How do I achieve the same result using pd.pivot ?
Thanks!