def massage_data(raw_data):
    """ Preprocess the data for predictions
    """
    raw_data.rename(index=str, columns={"whether he/she donated blood in March 2007": "label"}, inplace=True)
  
    # generate features for year for time columns
    for x, y in zip(['time_years', 'recency_years'], ['Time (months)', 'Recency (months)']):
        raw_data[x] = (raw_data[y] / 12).astype('int')
 
    # generate features for quarter for time columns (3 month periods)
    for x, y in zip(['time_quarters', 'recency_quarters'], ['Time (months)', 'Recency (months)']):
        raw_data[x] = (raw_data[y] / 3).astype('int')

    return raw_data