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