def add_error_total_and_proportion_cols(
        total_errs, total_rows, date,
        errs_by_table, total_by_table,
        aggregate_df_total, aggregate_df_error,
        aggregate_df_proportion):
    """
    Function adds a new column to the growing dataframes. This
    column contains information depending on the dataframe in
    question. The column may contain information about
        a. the total number of rows
        b. the total number of 'poorly defined' rows
        c. the relative contribution of a particular table
        to the number of 'poorly defined' rows

    The column represents a particular date. Each row
    represents a particular table type. The final row
    is an 'aggregate' metric that is a sum of the
    rows immediately above it.

    :param
    total_errs (int): total number of errors across all sites
        for a particular date; across all tables

    total_rows (int): total number of rows across all sites
        for a particular date; across all tables

    date (string): date used to index into the dictionaries above

    errs_by_table (list): list of the total number of
        poorly defined row counts across all sites.
        sequence of the list parallels the alphabetical
        order of the tables. has 'total' metric at the end.

    total_by_table (list): list of the total number of row counts
        across all sites. sequence of the list parallels the
        alphabetical order of the tables. has 'total'
        metric at the end.

    aggregate_df_total (dataframe): dataframe that contains the
        total number of rows across all sites. each column
        is a date. each row is a table type. last row
        is the total number of rows for a particular
        date.

    aggregate_df_error (dataframe): dataframe that contains
        the total number of poorly defined rows across
        all sites. each column is a date. each row is a table
        type. last row is the total number of poorly defined
        rows for a particular date.

    aggregate_df_proportion (dataframe): dataframe that
        shows the 'contribution' of each table to the
        total number of poorly defined rows. for instance,
        if a table has half of all of the 'poorly defined
        rows' for a particular date, it will have a value of
        0.5. each column is a date. each row is a table
        type.

    :return:

    aggregate_df_total (dataframe): same as the df that
        entered except now with an additional column
        to represent the date in question

    aggregate_df_error (dataframe): same as the df that
        entered except now with an additional column
        to represent the date in question

    aggregate_df_proportion (dataframe): same as the df
        that entered except now with an additional
        column to represent the date in question

    """
    # adding to the growing column
    # total number of 'poorly defined' rows for a date
    if total_errs > 0:
        errs_by_table.append(total_errs)
    else:
        errs_by_table.append(float('NaN'))

    # total number of rows for a table for the date
    if total_rows > 0:
        total_by_table.append(total_rows)
    else:
        total_by_table.append(float('NaN'))

    # column for the 'total' rows; column for one date
    aggregate_df_total[date] = total_by_table

    # column for 'error' rows; column for one date
    aggregate_df_error[date] = errs_by_table

    # column for the contribution of each error type
    succ_rate_by_table = []
    for errors, total in zip(errs_by_table, total_by_table):
        error_rate = round(errors / total * 100, 2)
        success_rate = 100 - error_rate
        succ_rate_by_table.append(success_rate)

    aggregate_df_proportion[date] = succ_rate_by_table

    return aggregate_df_error, aggregate_df_total, \
        aggregate_df_proportion