def add_errorvals(df, col, lower, upper):
    """
    Given the columns for value, lower, upper value, calculate the values needed by plotly error and error minus.
    Use the original col name with _e and _em suffixes for that
    """
    df[col + "_e"] = df.apply(lambda row: row[upper] - row[col], axis=1)
    df[col + "_em"] = df.apply(lambda row: row[col] - row[lower], axis=1)
    return df