5.5. Functions

pytablewriter.dumps_tabledata(value: tabledata._core.TableData, format_name: str = 'rst_grid_table', **kwargs) str[source]
Parameters
  • value (tabledata.TableData) – Tabular data to dump.

  • format_name (str) – Dumped format name of tabular data. Available formats are described in create_from_format_name()

Example
>>> dumps_tabledata(value)
.. table:: sample_data

    ======  ======  ======
    attr_a  attr_b  attr_c
    ======  ======  ======
         1     4.0  a
         2     2.1  bb
         3   120.9  ccc
    ======  ======  ======