I have a dataframe like this:
id text
1 DM,HTN,Enlarged prostate
2 hypertensive and on regular treatment
2 LBP
3 DM,HTN,Enlarged prostate
I want to combine the text of same id like this:
id text
1 DM,HTN,Enlarged prostate
2 hypertensive and on regular treatment LBP
3 DM,HTN,Enlarged prostate
the texts of id 2 are combined. how can i acchieve this? Any help would be appreciated.