How to use the termtables.styles function in termtables

To help you get started, we’ve selected a few termtables examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nschloe / termtables / termtables / View on Github external
def to_string(
    data, header=None, alignment="l", padding=(0, 1), style=styles.thin_double
        depth = len(data.shape)
    except AttributeError:
        depth = _get_depth(data)

    if depth == 2:
        data = [data]
        assert depth == 3

    if header:
        data = [[header]] + data

    # Make sure the data is consistent
    num_columns = len(data[0][0])


Pretty tables in the terminal

Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular termtables functions