def _format_column(column, places=4):
    """
    Given a column from the table, converts it to a nicely formatted string
    and returns it. The column can be float, int, bool or a string. Strings
    are returned untouched.

    """
    if isinstance(column, float):
        column = ("%%.%dg" % places) % column
    elif isinstance(column, int) or isinstance(column, bool):
        column = str(column)
    #else:
        # It's a string, leave it alone.

    return column