dimanche 7 juin 2020

How to generate random numbers and add prefix based on given N in python pandas dataframe?

I have a following pandas dataframe:

Prefix  Count
98510   3
98472   2
98435   4
98011   1
98452   2

Now based on prefix and Count I have to generate unique random numbers for each prefix between 00000 to 99999 and add them to prefix The output should look like this

Numbers
9851015651
9851058616
9851069815
9847279462
9847263458
9843556984
9843591329
9843513584
9843532564
9801112358
9845265841
9845279154



Aucun commentaire:

Enregistrer un commentaire