TableFormatter

default_header_format: str
default_column_join: str
default_row_join: str
default_separator: str
default_column_alignment: str
default_header_alignment: str
default_row_padding: str
supported_alignments: dict

 

__init__(self, column_formats, *, headers=None, header_spans=None, header_format=None, column_join=None, row_join=None, header_column_join=None, header_row_join=None, separator=None, separator_lines=1, content_join=None, column_alignments=None, header_alignments=None, row_padding=None): 

 

@classmethod
prep_input_arrays(cls, headers, data, header_spans): 

 

@classmethod
custom_formatter(cls, f): 

 

@classmethod
resolve_formatters(cls, ncols, col_formats): 

 

@classmethod
prep_formatters(cls, formats): 

 

@classmethod
format_tablular_data_columns(cls, data, formats, row_padding=None, strict=False): 

 

@classmethod
align_left(cls, col, width): 

 

@classmethod
align_right(cls, col, width): 

 

@classmethod
align_center(cls, col, width): 

 

@classmethod
align_dot(cls, col, width, dot='.'): 

 

@classmethod
resolve_aligner(cls, alignment): 

 

@classmethod
align_column(cls, header_data, cols_data, header_alignment, column_alignment, join_widths: 'list[int]', header_widths): 

 

format(self, headers_or_table, *table_data, header_format=None, header_spans=None, column_formats=None, column_alignments=None, header_alignments=None, column_join=None, row_join=None, header_column_join=None, header_row_join=None, separator=None, separator_lines=None, content_join=None, row_padding=None): 

 

@classmethod
extract_tree_headers(cls, tree, key_normalizer=None, depth=0, default_key=None, terminal_data_function=None): 

 

@classmethod
from_tree(cls, tree_data, header_spans=None, key_normalizer=None, depth=0, default_key=None, column_formats=None, header_normalization_function=None, header_function=None, terminal_data_function=None, **opts): 

 

@classmethod
format_tree(cls, tree_data, data_normalization_function=None, **opts): 

Feedback

Examples

Templates

Documentation