def center_and_scale_rows(df):
    """
    For each row of the dataframe,
    subtract the row mean, and divide by the row standard deviation.
    """
    centered = df.sub(df.mean(axis=1), axis=0)
    return centered.div(centered.std(axis=1), axis=0)