Skip to content
Advertisement

Groupby and get the values in one dataframe

I have a dataframe which I need to do groupby by multiple columns and get the items within every group as a row;

enter image description here

I need to output a below table after group;

enter image description here

I have been looking for the answer but I was not able to find any, I appreciate if you can help we with the code.

Advertisement

Answer

You could try this:

JavaScript

Output:

JavaScript
User contributions licensed under: CC BY-SA
10 People found this is helpful
Advertisement