I'm newbie in Python and Pandas. Could you give me advice how to make next manipulation with DataFrame? I have DataFrame_1:
id id_name revenue
0 a name_a 65
1 a name_b 65
2 a name_a 70
3 a name_b 70
4 a name_a 121
5 a name_b 121
and I want to make next DataFrame_2:
id id_name revenue
0 a name_a, name_b 65
1 a name_a, name_b 70
2 a name_a, name_b 121
and then make the next DataFrame_3
id id_name1 id_name2 revenue
0 a name_a name_b 65
1 a name_a name_b 70
2 a name_a name_b 121
So, I want on the first step combine strings with the same 'revenue', and on the second step break up column 'id_name'.
idvariable? If you're only grouping onRevenuewhat do you want to happen in the case that theRevenueis the same butidis different?