src/lsi/utils/table.py
def prepare_rows(table):
    """
    Prepare the rows so they're all strings, and all the same length.

    :param table: A 2D grid of anything.
    :type table: [[``object``]]

    :return: A table of strings, where every row is the same length.
    :rtype: [[``str``]]
    """
    num_columns = max(len(row) for row in table)
    for row in table:
        while len(row) < num_columns:
            row.append('')
        for i in range(num_columns):
            row[i] = str(row[i]) if row[i] is not None else ''
    return table
def prepare_rows(table):
    num_columns = max(len(row) for row in table)
    for row in table:
        while len(row) < num_columns:
            row.append('')
        for i in range(num_columns):
            row[i] = str(row[i]) if row[i] is not None else ''
    return table
def prepare_rows ( table ) : num_columns = max ( len ( row ) for row in table ) for row in table : while len ( row ) < num_columns : row . append ( '' ) for i in range ( num_columns ) : row [ i ] = str ( row [ i ] ) if row [ i ] is not None else '' return table
Prepare the rows so they're all strings, and all the same length.

    :param table: A 2D grid of anything.
    :type table: [[``object``]]

    :return: A table of strings, where every row is the same length.
    :rtype: [[``str``]]
Prepare the rows so they re all strings and all the same length .