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