1
$\begingroup$

I want to generate 2x6 dataframe which represents a rack to optimizing a dual cycle in optimizing warehouse.Half of this dataframe are filled with storage items and the other half is with retrieval items. I want to do is random chosing half of these 12 items and say that they are storage and others are retrieval. How can I randomly choose?

I tried random.sample but this chooses random columns.Actually I want to choose random items individually.

$\endgroup$

1 Answer 1

1
$\begingroup$

Assign each of the 12 items a number drawn from the U[0,1] distribution. The six items with the lowest uniform values are "storage", the six with the highest values are "retrieval".

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.