def format_cardinality(rows, cardinality, nulls):
    """Format cardinality of the column

    Args:
        rows (int): number of rows
        cardinality (int): number of distinct values
        nulls (int): number of null-values

    Returns:
        str: cardinality with the format '%.2f'.
    """
    if rows is None or cardinality is None or nulls is None:
        return "N/A"
    if rows == nulls:
        return 'N/A'

    return "%.02f" % (float(cardinality) / float(rows - nulls) * 100) + " %"