bool_table_repr
- glotaran.plugin_system.io_plugin_utils.bool_table_repr(table_data: Iterable[Iterable[Any]], true_repr: str = '*', false_repr: str = '/') Iterator[Iterator[Any]] [source]
Replace boolean value with string repr for all table values.
This function is an implementation of
bool_str_repr()
for a 2D table, for easy usage with tabulate.- Parameters:
- Returns:
table_data
with original values or desired repr for bool- Return type:
Iterator[Iterator[Any]]
See also
Examples
>>> table_data = [["foo", True, False], ["bar", False, True]] >>> print(tabulate(bool_table_repr(table_data)) --- - - foo * / bar / * --- - -