You can concatenate specific column values in a multi-column duplicate row by doing the following, but all columns other than those specified in the groupby will disappear.
The columns title, thumbnail, name, created_at are present.
Retrieve the rows with duplicate title and thumbnail as follows
and concatenate the values of the name column of the duplicated row while keeping the first row.
I want to create a new column for it.
However, as mentioned earlier, columns other than those specified in groupby will disappear.
df.groupby(['title', 'thumbnail'])['name'].apply(lambda x: ' '.join(x)).reset_index()