Trying to club the occurrences of col1 and storing it in a new column as col1_occurences, but unable to do so, please help
Input df:
col1 col2
sheet1 john
sheet2 harry
sheet3 john
sheet4 mark
sheet5 mark
Expected Output
col1 col2 col1_occurences
sheet1 john sheet1,sheet3
sheet2 harry sheet2
sheet3 john sheet1,sheet3
sheet4 mark sheet4,sheet5
sheet5 mark sheet4,sheet5