79248703

Date: 2024-12-03 17:59:24
Score: 1.5
Natty:
Report link

If your dataframe is df:

df['Col2'] = df['Col2'].astype('str')  # all the columns must be strings
gp_col = df.groupby(["Name"])[['Col1', 'Col2', 'Col3']] \
           .agg(lambda x: " / ".join(x)) \
           .reset_index()

display(gp_col) gives:

result

Reasons:
  • Probably link only (1):
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (0.5):
Posted by: rehaqds