currently I have a long dataframe that looks like this:
PS_NAME PS_DATE PARAMETER NUMBER_VALUE
7310 2021-07-07 00:00:00 Total Protein 280.4438
7311 2021-07-09 00:00:00 Total Protein 253.0149
7312 2021-07-14 00:00:00 Total Protein 298.8616
I want to change the shape of my dataframe so that each PARAMETER
(Total Protein, in this case) is its own column, and the NUMBER_VALUE
should populate that column.
Something like this:
PS_NAME PS_DATE Total Protein
7310 "" 280.4438
7311 "" 253.0149
7312 "" 298.8616
The values under Total Protein should include the values under NUMBER_VALUE
How do I change the shape of my data so that it looks like that?