concatenate rows of pandas dataframe with same id,df.groupby('id').agg(lambda x: x.tolist())