def process_raw_df(df):
    """ Clean abstract and title fields from a pandas data frame."""

    df.abstract = df.abstract.str.strip()
    df.abstract = df.abstract.str.replace(
        '\n', ' ', regex=True).replace('\s+', ' ', regex=True)

    df.title = df.title.str.strip()
    df.title = df.title.str.replace(
        '\n', ' ', regex=True).replace('\s+', ' ', regex=True)

    return df