def encode_values(df, total, scale=100):
    """Convert a dataframe from acres to integer scalar values:
    scale * value / total

    This can be used to express percent where scale = 100

    Values are packed into a pipe-delimited string with 0 values omitted, e.g.,
    '10|20|70||'

    Parameters
    ----------
    df : DataFrame
        Note: only includes columns to be divided by total.
    total : number
        Must be greater than 0.

    Returns
    -------
    Series
        Contains string for each record with pipe-delimited values.  If
        max encoded value across all bins is 0, an empty string is returned instead.
    """
    return (
        (scale * df.divide(total, axis=0))
        .round()
        .astype("uint")
        .apply(lambda r: "|".join(str(v or "") for v in r) if r.max() else "", axis=1)
    )