I have a df with three columns no , name, date . If no and date are matched thier value will be added in output column to a list.
Ex: 1234 and 2 matched from 0 and 1 rows - so [a,b]
If no and date doesn't match add the same name value to list
no name date
0 1234 a 2
1 1234 b 2
2 1234 c 3
3 456 d 1
4 456 e 2
5 789 f 5
Resultant Output.
no name date output
0 1234 a 2 [a,b]
1 1234 b 2 [a,b]
2 1234 c 3 [c]
3 456 d 1 [d]
4 456 e 2 [e]
5 789 f 5 [f]