def calculate_percentage_per_column(dataframe, metric):
    """Calculate the percentage against 2 Pandas Series.

    It selects 2 columns, metric.name and metric.limit, out of the dataframe,
    sums the values per column and then calculate the percentage.

    Example where metric.name is 'CurrConns' and metric.limit is 'MaxConn'.
    It calculates the sum per column and the retuns the percentage of CurrConns
    as part of Maxconn.
    +---+---------+-----------+
    |   | MaxConn | CurrConns |
    +---+---------+-----------+
    | 0 | 300     | 13        |
    | 1 | 300     | 15        |
    | 2 | 300     | 11        |
    +---+---------+-----------+

    Arguments:

        dataframe (obj): Pandas dataframe with statistics for HAProxy workers
        metric (tuple): A namedtuple of MetricNamesPercentage


    Returns:
        A percentage as integer

    """
    _sum = dataframe.loc[:, [metric.name]].sum()[0]
    _sum_limit = dataframe.loc[:, [metric.limit]].sum()[0]
    if _sum_limit == 0:
        return 0

    return int(100 * _sum / _sum_limit)