def reshape_1d(df):
    """If parameter is 1D row vector then convert it into 2D matrix."""
    shape = df.shape
    if len(shape) == 1:
        return df.reshape(shape[0], 1)
    else:
        return df
