1

From:

    ID | Count | IC     | Supplier |  
    123 | 43   | 124234 | /A/B/C   |  

To:

ID  | Count | IC     | Supplier |  
123 | 43    | 124234 | /A       |  
123 | 43    | 124234 | /B       |      
123 | 43    | 124234 | /C       | 

Hi Guys , as explained in the 1st table in image , I would like to convert it to the second table. In essence:

  1. To replicate rows based on content of Column ' Supplier'
  2. Every row contains a unique value of Supplier

Refer to image for more info.

Thanks in advance , this is very similar to R - Replicating Rows By Indicator within Column, but i am looking for the python solution.

Cheers Tonz

Tonz
  • 177
  • 1
  • 2
  • 11
  • 2
    Please post code and data as text, not images. – Nick Mar 30 '20 at 06:45
  • Hi i was told by stackflow i don't have the authority to post images here yet. When i do so , it was converted into an image – Tonz Mar 30 '20 at 06:47
  • 1
    My comment was that you shouldn't be posting images of data. You should cut and paste the *actual* data into the question. It makes it a lot easier for people to answer as they can work with the data you are using. – Nick Mar 30 '20 at 06:49
  • I have coded it into a table like form. The dataset was in excel , when i cut and paste , it generates a link leading to the image – Tonz Mar 30 '20 at 07:34

0 Answers0