text_plain_output_1.png
import pandas as pd

titanic = pd.read_csv('../input/train.csv')

def split(passenger):
    age, sex = passenger
    if age < 16:
        return 'child'
    else:
        return sex

titanic['person'] = titanic[['Age', 'Sex']].apply(split, axis=1)
titanic[0:10]