0

I am trying to add 2 new columns to my users_df about ages and sex. I want it to respect the following proportions:

Male: 51%

Female: 49%

and...

15 to 24 years old: 13%

25 to 44 years old: 39%

45 to 64 years old: 30%

65 and more: 18%

All I can find is how to impute missing values or create the column with

np.random.randint

Ages can be random as long as they respect the ranges from above.

Thanks in advance!

0 Answers0