How to combine multiple rows into a single row with pandas [duplicate]
Solution 1:
You can use groupby
and apply
function join
:
print df.groupby('value')['tempx'].apply(' '.join).reset_index()
value tempx
0 1.5 picture1 picture555 picture255 picture365 pict...