The df I am working on looks like this
co1 col2
A ['1','2','er']
A []
B ['1','3','4','abc']
B ['5']
C []
I want to calculate the % of each element in the list in col2 for each value in col1. i.e calculate % of 1 for A, calculate % of 2 for A, calculate % of abc for B I am looking for a solution to do this iteratively. Thanks
The link to input data (before explode) - [https://drive.google.com/file/d/1fuOBo8PK1heAtfufBlplXXfh4FiLpBCD/view?usp=sharing][1]
The link to output after explode - [https://drive.google.com/file/d/1mcArrsu3TWJC6hYZ2kIHAkAzCaHd1DLH/view?usp=sharing][2]