Repository navigation
Make export_to_pandas output independent of the pandas version - #67
Merged
Merged
Conversation
pandas 3.1.0 changed how a timedelta column is displayed: every value is now padded to microseconds (0 days 10:00:00.000000), where 2.x and 3.0.x print whole seconds as 0 days 10:00:00. The e2e runner installs pandas unpinned, so the Python leg started failing against the golden output. Format the time column with str() per Timedelta, which gives the same text on pandas 2.3.3, 3.0.6 and 3.1.0 and matches the existing golden file unchanged.
wei-mclarenapplied
approved these changes
Oct 27, 2026
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.
The Python leg of the e2e run started failing on
export_to_pandas:Cause
pandas 3.1.0 changed how a timedelta column is displayed. Every value is now padded to microseconds (
0 days 10:00:00.000000); 2.x and 3.0.x print whole seconds as0 days 10:00:00. The CI agent installs pandas unpinned, so it picked up 3.1.0. SQL Race output is unaffected.Fix
Print the
timecolumn withstr()perTimedelta(to_string(..., formatters={"time": str})). That gives the same text on every pandas version, so customers on any pandas see the documented output, and the golden file stays unchanged.Testing
The printed head of the DataFrame matches
tests/golden/Python/export_to_pandas.txtexactly on pandas 2.3.3, 3.0.6 and 3.1.0. Without the change, 3.1.0 reproduces the CI diff. I tested with an equivalent DataFrame (same timestamps and values), not by running the snippet against a SQL Race session.