Skip to content

Short headers silently drop columns from ragged tables #494

Open

Description

@ub3dqy

On current master (268615a5), adding a header silently hides columns that occur after a short first data row:

from tabulate import tabulate
print(tabulate([["a"], ["b", "KEEP"]], headers=["tail"]))

KEEP is missing; without headers it is retained. This also affects headers="firstrow" and column-index headers. No maxcolwidths is needed, so #482 leaves this case unchanged.

I have a fix with 28 regression/control cases. The configured suites pass on Python 3.11 and 3.14. Would you be willing to pay $50 for the tested fix, regression tests, and documentation update?

Dima Mak / ub3dqy

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions