i have two columns age and sex in a pandas dataframe
sex = [\'m\', \'f\' , \'m\', \'f\', \'f\', \'f\', \'f\'] age = [16 , 15 , 14 , 9 , 8 , 2 , 56 ] <
You could use pandas.DataFrame.where. For example
child.where(age<=9, sex)