Hey Guys,
Trying to create some dummy data for a project. I have sample dataset of 1000 doctors and there is a feild called speciality which has certain list of values i want to randomly allocate each docter value from that very list of 10 values.
Sample data
Docid Docname
1 A
2 B
3 C
4 D
Speciality
Oconology
Dentist
My output should be randomly generated as :
Docid Docname Speciality
1 A Dentist
2 B Oconology
3 C Dentist
4 D Dentist
Thank you in advance
Solved! Go to Solution.
Is there a way to apply weightage to the random assignments ? For example, if I wanted twice as many dentists compared with any other specialty.
My actual distribution looks something like this:
Group A - 63%
Group B - 16%
Group C - 10%
Group D - 6%
Group E - 5%
(each of these groups are a specialty - Virologists, Oncologists, etc)
Any help would be much appreciated !
Imran
Hi @syedimranhashmi! There is definitely a way to accomplish a weighted random assignment. Here's one approach in a nutshell:
At this point, the group connected with the kept range will be attached to your main data, effectively randomly assigning the data, with weights! I attached a workflow that does what I described above. Let me know if you have any questions!