I have a dataset in the following format:
Keyword Type Count
"Key 1" Normal 5
"Key 1" Sponsored 2
"Key 2" Normal 1
"Key 2" Sponsored 0
"Key 3" Normal 5
"Key 4" Sponsored 3
"Key 5" Normal 5
"Key 5" Sponsored 4
I would like to change the schema of the table in something like this:
Keyword Normal Sponsored
"Key 1" 5 2
"Key 2" 1 0
"Key 3" 5 N/A
"Key 4" N/A 3
"Key 5" 5 4
I have no idea at the moment about how to do it (except for something like iterating every keyword, and rebuilding the DF from scratch... I believe there is a better way?)