I have around 20 columns in my dataset. I have many records for same id since few columns are captured as new records. I need to pivot them and have one record for each id. I have attached an example below of the pivot I am looking for. Can someone please advise if this can be done in Python.
Expected Output: