Fix named index columns when filtering dataframe variables - #1548
Open
Lu-Charles wants to merge 2 commits into
Open
Lu-Charles wants to merge 2 commits into
Lu-Charles wants to merge 2 commits into
Conversation
Lu-Charles
marked this pull request as ready for review
October 1, 2026 18:12
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #1502.
When
variablesis set, the pandas driver can leave a namedindex_colout of the columns passed to pandas. This causes calls withindex_col="time"andparse_dates=["time"]to fail because the time column is missing. Keep the named index column in the selection without duplicating it or modifying the caller's variables list.Added regression tests for CSV and Excel reads, index-column positions, and combined time and variable filtering through
DataCatalog.get_dataframe. The changelog is updated; no catalog definitions are changed.On Python 3.13, the selected catalog and reader tests passed with 167 passed, 30 skipped, and 77 manual cases excluded. The 46 focused tests also passed with pandas 2.3.3 and 3.0.6. Applicable pre-commit checks passed. The full test suite and CI matrix have not been run.