Let's say this is my df
A B C
0 a 33 13
1 b 44 14
2 a 55 15
3 a 66 16
4 b 77 17
5 c 88 18
and I try to get something like this
A B B C
count list sum
0 a 3 33,55,66 44
1 b 2 44,77 31
2 c 1 88 81
Is there any pythonic way to do it?
This is my code but it is not pythonic
df.groupby('A').agg({'B': ["count", lambda x: ','.join(x.astype(str))], 'C':sum})