How to get the unique combinations of values from a column per group and add new columns in the orginal dataframe I have a dataframe like below :