hi I have a huge data set as below
sample data:-
customerId products
0 20
1 2|2|23|
0 111|29|11|11|33|11|33
3 164|227
1 2|2
Now I want to convert this data set as below
customerId products purchase_count
0 20 1
0 111 1
0 29 1
0 11 3
0 33 2
1 2 4
1 23 1
3 164 1
3 227 1
Please help me with this