i have a dataframe like this
Number Names
0 1 Josh
1 2 Jon
2 3 Adam
3 4 Barsa
4 5 Fekse
5 6 Bravo
6 7 Barsa
7 8 Talyo
8 9 Jon
9 10 Zidane
how can i group these numbers based on names
for Number,Names in zip(dsa['Number'],dsa['Names'])
print(Number,Names)
The above code gives me following output
1 Josh
2 Jon
3 Adam
4 Barsa
5 Fekse
6 Bravo
7 Barsa
8 Talyo
9 Jon
10 Zidane
How can i get a output like below
1 Josh
2,9 Jon
3 Adam
4,7 Barsa
5 Fekse
6 Bravo
8 Talyo
10 Zidane
I want to group the numbers based on names