def _course_behavior(df, ranges):
    "Creates 'Course Behavior' column based on channel specific course ranges.\n    "
    course_behavior = ('Outbound', 'Inbound')
    df = df[(((df.loc[:, 'Course'] >= ranges[0][0]) & (df.loc[:, 'Course'] <= ranges[0][1])) | ((df.loc[:, 'Course'] >= ranges[1][0]) & (df.loc[:, 'Course'] <= ranges[1][1])))]
    df.loc[:, 'Course'] = round(df.loc[:, 'Course']).astype('int')
    df.loc[:, 'Course Behavior'] = df.loc[:, 'Course'].copy()
    courses = {}
    for (behavior, bounds) in zip(course_behavior, ranges):
        lower_bound = bounds[0]
        upper_bound = bounds[1]
        for j in range(lower_bound, (upper_bound + 1)):
            courses[j] = behavior
    df.loc[:, 'Course Behavior'] = df.loc[:, 'Course Behavior'].replace(courses).astype('str')
    return df
Creates 'Course Behavior' column based on channel specific course ranges.
def _course_behavior(df, ranges):
    "\n    "
    course_behavior = ('Outbound', 'Inbound')
    df = df[(((df.loc[:, 'Course'] >= ranges[0][0]) & (df.loc[:, 'Course'] <= ranges[0][1])) | ((df.loc[:, 'Course'] >= ranges[1][0]) & (df.loc[:, 'Course'] <= ranges[1][1])))]
    df.loc[:, 'Course'] = round(df.loc[:, 'Course']).astype('int')
    df.loc[:, 'Course Behavior'] = df.loc[:, 'Course'].copy()
    courses = {}
    for (behavior, bounds) in zip(course_behavior, ranges):
        lower_bound = bounds[0]
        upper_bound = bounds[1]
        for j in range(lower_bound, (upper_bound + 1)):
            courses[j] = behavior
    df.loc[:, 'Course Behavior'] = df.loc[:, 'Course Behavior'].replace(courses).astype('str')
    return df