Skip to content

Count data rows when validating custom indices - #470

Open
muneikh wants to merge 1 commit into
astanin:masterfrom
muneikh:index-data-rows-around-separators
Open

muneikh wants to merge 1 commit into
astanin:masterfrom
muneikh:index-data-rows-around-separators

Conversation

@muneikh

@muneikh muneikh commented Oct 11, 2026 •

Copy link
Copy Markdown

A custom index with two labels is rejected for a table containing two data rows and a separating line, although the same labels work when supplied as an iterator. Index-length validation counts the separator marker as a data row, while index application skips it.

Remove separating lines before validating a sized index and generate automatic indices from the data-row count. Document that separators do not consume index values. Regressions cover list/tuple/iterator indices, automatic numbering and the reported length for mismatched indices.

Validation: three new cases fail before the patch. Full Python 3.10 suite passes (328 passed, 60 skipped); full Python 3.13-extra suite with NumPy, Pandas and wcwidth passes (387 passed, 1 skipped). Ruff formatting and lint for the new test pass. The configured full-tree Ruff check reports 269 existing diagnostics, identical to a clean HEAD baseline, with none added.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant