def filter_data(all_data):
    """
    Takes the data from SIMS and removes all students not in
    block 1 of the current academic year.

    This should remove any students on placement (block 1S),
    doing a dissertation (block D1/D2) or repeating something (block 2)
    """
    # Remove all students not from this academic year
    YEAR_COLUMN = 'Acad Year'
    THIS_YEAR = '2017/8'
    filtered_data = all_data.loc[all_data[YEAR_COLUMN] == THIS_YEAR]

    # Remove all students not currently in block 1 (so those doing placement or dissertation)
    BLOCK_COLUMN = 'Block'
    filtered_data = filtered_data.loc[filtered_data[BLOCK_COLUMN] == '1']

    return filtered_data