Skip to content

Fix tolerances for DataFrames with MultiIndex columns - #255

Open
Boulea7 wants to merge 2 commits into
ESSS:masterfrom
Boulea7:ln-cx/fix-pytest-regressions-237-multiindex-tolerance
Open

Boulea7 wants to merge 2 commits into
ESSS:masterfrom
Boulea7:ln-cx/fix-pytest-regressions-237-multiindex-tolerance

Conversation

@Boulea7

@Boulea7 Boulea7 commented Sep 30, 2026 •

Copy link
Copy Markdown

DataFrames with MultiIndex columns store one CSV header record per level. Reading only the first record made numeric values compare as strings, so floating-point changes failed even within the requested tolerance. Read the complete header and handle named-index metadata separately, preserving exact integer comparisons and checks on index values and names.

Regression tests cover single- and multi-level column headers, tuple-key tolerances, and index metadata boundaries that must preserve exact integer comparisons and all data rows. The stored CSV format is unchanged. Short existing baselines can still be updated with --force-regen when the column header gains levels.

Validated with direct pytest and coverage runs on Python 3.11 using pandas 3.0.6 and 2.3.3: 144 tests passed for each version, with 93.53% and 93.68% coverage, respectively. Other Python versions and Windows await CI.

Fixes #237.

@Boulea7
Boulea7 marked this pull request as ready for review October 1, 2026 15:59
Copilot AI balanced review requested due to automatic review settings October 1, 2026 15:59

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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.

dataframe regression and multiindex

2 participants