-
craftutils.wrap.dragons.Table.pformat_all(max_lines=
- 1, max_width=- 1, show_name=True, show_unit=None, show_dtype=False, html=False, tableid=None, align=None, tableclass=None) - Return a list of lines for the formatted string representation of
the entire table.
If no value of
max_linesis supplied then the height of the screen terminal is used to setmax_lines. If the terminal height cannot be determined then the default is taken from the configuration itemastropy.conf.max_lines. If a negative value ofmax_linesis supplied then there is no line limit applied.The same applies for
max_widthexcept the configuration item isastropy.conf.max_width.
Parameters¶
- max_linesint or None
Maximum number of rows to output
- max_widthint or None
Maximum character width of output
- show_namebool
Include a header row for column names. Default is True.
- show_unitbool
Include a header row for unit. Default is to show a row for units only if one or more columns has a defined value for the unit.
- show_dtypebool
Include a header row for column dtypes. Default is True.
- htmlbool
Format the output as an HTML table. Default is False.
- tableidstr or None
An ID tag for the table; only used if html is set. Default is “table{id}”, where id is the unique integer id of the table object, id(self)
- alignstr or list or tuple or None
Left/right alignment of columns. Default is right (None) for all columns. Other allowed values are ‘>’, ‘<’, ‘^’, and ‘0=’ for right, left, centered, and 0-padded, respectively. A list of strings can be provided for alignment of tables with multiple columns.
- tableclassstr or list of str or None
CSS classes for the table; only used if html is set. Default is None.
Returns¶
- lineslist
Formatted table as a list of strings.