def abbreviate_features(df):
    """Remove the 'MagpieData ' prefix in the column names and replace whitespace with underscore"""
    old_names = list(df)
    new_names = [name.replace("MagpieData ", "") for name in old_names]
    new_names = [name.replace(" ", "_") for name in new_names]
    name_mapper = dict(zip(old_names, new_names))
    return df.rename(columns=name_mapper)