pandas group by concat

Solutions on MaxInterview for pandas group by concat by the best coders in the world

showing results for - "pandas group by concat"
Lisa
21 Sep 2018
1In [124]:
2
3df.groupby(['name','month'])['text'].apply(lambda x: ','.join(x)).reset_index()
4
5Out[124]:
6    name  month         text
70  name1     11       hej,du
81  name1     12        aj,oj
92  name2     11     fin,katt
103  name2     12  mycket,lite
11