Let's say that I have Table 'sales':
ProductId Sales
0 [1] $199
1 [2] $299
2 [3, 4, 5] $399
3 [6, 7, 8] $499
and Table 'product':
ID Product
0 1 A
1 2 B
2 3 C
3 4 D
4 5 E
5 6 F
6 7 G
7 8 H
I want to return a new table 'sales_product'
Product Sales
0 A $199
1 B $299
2 C,D,E $399
3 F,G,H $499
So it can find all the matched ProductId and return Product value as a comma-joined string in the new table.
Any Python method can achieve this?