A python table printer for a given dataset.
Actual version: 1.0.0
The files included in this project:
- example.py: an example on how to use TablePrinter.
- printer.py: the TablePrinter file.
Add a row to the table's dataset.
- row: input must be a list.
- times (optional): how many times the row must be added; default=1.
Set the dataset of the row giving a list of lists or a list of dictionaries.
- dataset: input must be a list of lists or list of dictionaries.
- ignore_keys (optional): if the dataset given is a dictionary, state which keys to ignore in case you don't want to add all of the values.
Set the header of the table. If not provided, the header will keep empty.
Print the table.
- show_header (optional): if the header must be printed; default=True.
- header_upper (optional): if the header must be printed in upper case; default=True.
- cell_padding (optional): left and right padding of all the cells; default=0.
- cell_min_width (optional): minimum with the rows must have; default=0.
- row_border (optional): if each row must be printed with a bottom separator; default=False.
- auto_id (optional): print each row with an automatic id at the first column; default=False.