0

My question is a step further from this question(Aggregating string columns using pandas GroupBy).

From

df =

id  type      name        value
1     aa        kk          11
2     bb        mm          22
3     bb        ll          33
4     aa        ll          44
5     bb        kk          55
6     aa        oo          66
7     aa        mm          77
8     bb        ll          88
9     aa        ll          99

To

id  type    name(list)    value(sum)
1     aa    kk,ll,mm,oo    297
2     bb    kk,ll,mm       198

Is this possible? How to achieve this?

David H. J.
  • 340
  • 2
  • 12

0 Answers0