def process_family(df):
    """
    Evaluates the SibSp and Parch columns to determine if passenger was
    alone and assigns accordingly.

    :param df: Dataframe to be transformed
    :return: Transformed dataframe
    """
    df.loc[(df['SibSp'] > 0) | (df['Parch'] > 0), 'isalone'] = 0
    df.loc[(df['SibSp'] == 0) & (df['Parch'] == 0), 'isalone'] = 1
    return df