def get_inferred_data_table(table, pc):
    """
    Table level: Dive down, calculate data, then return the new table with the inferred data.

    :param str pc: paleo or chron
    :param dict table: Metadata
    :return dict table: Metadata
    """
    age = None
    if pc == "paleo":
        # Get the age values data first, since it's needed to calculate the other column data.
        age = _get_age(table["columns"])

    try:
        # If age values were not found, then skip resolution.
        if age:
            # Loop for all the columns in the table
            for var, col in table["columns"].items():
                # Special cases
                # We do not calculate data for each of the keys below, and we cannot calculate any "string" data
                if "age" in var or "year" in var:
                    # Calculate m/m/m/m, but not resolution
                    table["columns"][var] = _get_inferred_data_column(col)
                elif not all(isinstance(i, str) for i in col["values"]):
                    # Calculate m/m/m/m and resolution
                    table["columns"][var] = _get_inferred_data_res(col, age)
                else:
                    # Fall through case. No calculations made.
                    logger_inferred_data.info("get_inferred_data_table: "
                                              "Not calculating inferred data for variableName: {}".format(var))

        # If there isn't an age, still calculate the m/m/m/m for the column values.
        else:
            for var, col in table["columns"].items():
                if not all(isinstance(i, str) for i in col["values"]):
                    # Calculate m/m/m/m and resolution
                    table["columns"][var] = _get_inferred_data_column(col)
                else:
                    # Fall through case. No calculations made.
                    logger_inferred_data.info("get_inferred_data_table: "
                                              "Not calculating inferred data for variableName: {}".format(var))

    except AttributeError as e:
        logger_inferred_data.warn("get_inferred_data_table: AttributeError: {}".format(e))
    except Exception as e:
        logger_inferred_data.warn("get_inferred_data_table: Exception: {}".format(e))

    table["columns"] = _fix_numeric_types(table["columns"])
    return table
def get_inferred_data_table ( table , pc ) : age = None if pc == "paleo" : age = _get_age ( table [ "columns" ] ) try : if age : for var , col in table [ "columns" ] . items ( ) : if "age" in var or "year" in var : table [ "columns" ] [ var ] = _get_inferred_data_column ( col ) elif not all ( isinstance ( i , str ) for i in col [ "values" ] ) : table [ "columns" ] [ var ] = _get_inferred_data_res ( col , age ) else : logger_inferred_data . info ( "get_inferred_data_table: " "Not calculating inferred data for variableName: {}" . format ( var ) ) else : for var , col in table [ "columns" ] . items ( ) : if not all ( isinstance ( i , str ) for i in col [ "values" ] ) : table [ "columns" ] [ var ] = _get_inferred_data_column ( col ) else : logger_inferred_data . info ( "get_inferred_data_table: " "Not calculating inferred data for variableName: {}" . format ( var ) ) except AttributeError as e : logger_inferred_data . warn ( "get_inferred_data_table: AttributeError: {}" . format ( e ) ) except Exception as e : logger_inferred_data . warn ( "get_inferred_data_table: Exception: {}" . format ( e ) ) table [ "columns" ] = _fix_numeric_types ( table [ "columns" ] ) return table
Table level: Dive down, calculate data, then return the new table with the inferred data.

    :param str pc: paleo or chron
    :param dict table: Metadata
    :return dict table: Metadata