def to_str(self) -> str:
        """
        Generates a string representation of the table, including headers and rows,
        suitable for printing or logging.
        """
        column_widths = self._calc_col_widths()
        table_str = self._generate_horizontal_border_str(column_widths) + "\n"

        for header in self.headers:
            table_str += self._generate_row_str(header.cells, column_widths) + "\n"
            table_str += self._generate_horizontal_border_str(column_widths) + "\n"

        for row in self.rows:
            table_str += self._generate_row_str(row.cells, column_widths) + "\n"
            table_str += self._generate_horizontal_border_str(column_widths) + "\n"

        return table_str.rstrip()

        Generates a string representation of the table, including headers and rows,
        suitable for printing or logging.
        
src/openparse/tables/table_transformers/schemas.py