How to use the beautifultable.helpers.BTColumnHeader function in beautifultable

To help you get started, we’ve selected a few beautifultable examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github pri22296 / beautifultable / beautifultable / helpers.py View on Github external
def header(self, value):
        self._header = BTColumnHeader(self._table, value)
github pri22296 / beautifultable / beautifultable / helpers.py View on Github external
def __setitem__(self, key, value):
        self._validate_item(value)
        super(BTColumnHeader, self).__setitem__(key, value)
github pri22296 / beautifultable / beautifultable / helpers.py View on Github external
def _reset_state(self, ncol):
        self._table._ncol = ncol
        self._header = BTColumnHeader(self._table, [None] * ncol)
        self._auto_width = True
        self._alignment = AlignmentMetaData(
            self._table, [self.default_alignment] * ncol
        )
        self._width = NonNegativeIntegerMetaData(self._table, [0] * ncol)
        self._padding_left = NonNegativeIntegerMetaData(
            self._table, [self.default_padding] * ncol
        )
        self._padding_right = NonNegativeIntegerMetaData(
            self._table, [self.default_padding] * ncol
        )
        self._table._data = type(self._table._data)(
            self._table,
            [
                BTRowData(self._table, [None] * ncol)
                for i in range(len(self._table._data))
github pri22296 / beautifultable / beautifultable / beautifultable.py View on Github external
        BTColumnHeader.__getitem__,
        details="Use 'BeautifulTable.columns.header.index(header)' instead.",
    )
    def get_column_index(self, header):  # pragma: no cover
        return self.columns.header.index(header)