我在数据框(df)中有一些数据:
Reference Description
0 C11621/2 The findings have been used
1 B01026/1 Findings from this research
2 D01469/1 The PopChange web resource
3 AM0156/1 The whole project was designed
4 AM0156/1 The data set has been used
5 AM0156/1 This project has become one
'Reference'
列中可能有重复项,如果存在,我想将数据合并在一起仅形成一行,即在上面的数据框中,以下3行具有重复的参考号:>
Reference Description
3 AM0156/1 The whole project was designed ...
4 AM0156/1 The data set has been used ...
5 AM0156/1 This project has become one ...
我想把它变成:
Reference Description
3 AM0156/1 The whole project was designed The data set has been used This project has become one
那怎么办?