def index_from_weekday(weekday):
    """
    Returns a numeric index for day of week based on name of day

    :param weekday: Name of day (e.g. 'Sunday', 'Monday', etc.)
    :return: numeric index
    """
    weekday_map = {
        'Sunday': 0,
        'Monday': 1,
        'Tuesday': 2,
        'Wednesday': 3,
        'Thursday': 4,
        'Friday': 5,
        'Saturday': 6
    }

    return weekday_map.get(weekday)