Skip to content

Fix the time coding docs for pandas 3.1 - #11796

Merged
headtr1ck merged 2 commits into
pydata:mainfrom
headtr1ck:docs-time-coding-pandas31
Oct 23, 2026
Merged

headtr1ck merged 2 commits into
pydata:mainfrom
headtr1ck:docs-time-coding-pandas31

Conversation

@headtr1ck

Copy link
Copy Markdown
Collaborator

Description

The docs build fails since pandas 3.1, which gives microsecond resolution for numeric input with any unit (release notes). pd.Timestamp(int64_min, unit="s") in the time coding page now raises OutOfBoundsDatetime.

  • Build the timestamps of the time range example from np.datetime64, which keeps its resolution (same output with pandas 2.3, 3.0 and 3.1)
  • Update the outdated paragraph on the resolution of numeric input

Checklist

  • User visible changes (including notable bug fixes) are documented in whats-new.rst

AI Disclosure

  • This PR contains AI-generated content.
    • I have tested any AI-generated content in my PR.
    • I take responsibility for any AI-generated content in my PR.
      Tools: Claude Code

🤖 Generated with Claude Code

headtr1ck and others added 2 commits October 23, 2026 11:28
pandas 3.1 gives microsecond resolution for numeric input with any unit, so the int64 extremes with unit='s' overflow. Build the timestamps from np.datetime64 instead, which keeps its resolution.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@headtr1ck headtr1ck added topic-documentation plan to merge Final call for comments labels Oct 23, 2026

@kmuehlbauer kmuehlbauer left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Thanks!

@headtr1ck
headtr1ck merged commit 232384a into pydata:main Oct 23, 2026
67 of 72 checks passed
LJimmy007 pushed a commit to LJimmy007/xarray that referenced this pull request Oct 24, 2026
Include the upstream pandas 3.1 documentation fix from pydata#11796 while preserving the reviewed query contribution.

Co-authored-by: Codex <noreply@openai.com>
@LJimmy007 LJimmy007 mentioned this pull request Oct 24, 2026
6 tasks done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants