Skip to content

Conversation

@jorisvandenbossche
Copy link
Member

@jorisvandenbossche jorisvandenbossche commented Dec 3, 2025

Rationale for this change

pandas 3.0 changes the default datetime/timedelta resolution from nanoseconds to microseconds. We already had mostly accounted for that in previous PRs, but pandas made this change the last days in a few additional places (eg pd.date_range), uncovering some more issues

What changes are included in this PR?

  • Don't hardcode the nanosecond unit in the metadata and when recreating a datetime-tz column's Index
  • Update a few tests to account for those changes

Are these changes tested?

Yes

Are there any user-facing changes?

No

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

⚠️ GitHub issue #48314 has been automatically assigned in GitHub to PR creator.

@jorisvandenbossche
Copy link
Member Author

@github-actions crossbow submit test-conda-python-3.13-pandas-nightly-numpy-nightly test-conda-python-3.13-pandas-upstream_devel-numpy-nightly

[(1, 'a', 2.0), (2, 'b', 3.0), (3, 'c', 4.0)],
columns=pd.date_range(
start='2017-01-01', periods=3, tz='America/New_York'
start='2017-01-01', periods=3, tz='America/New_York', unit='us'
Copy link
Member

Choose a reason for hiding this comment

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

Do we want to parametrize this test on datetime unit or is it superfluous?

@github-actions
Copy link

github-actions bot commented Dec 3, 2025

Revision: f0afc77

Submitted crossbow builds: ursacomputing/crossbow @ actions-bfea497ea7

Task Status
test-conda-python-3.13-pandas-nightly-numpy-nightly GitHub Actions
test-conda-python-3.13-pandas-upstream_devel-numpy-nightly GitHub Actions

@pitrou
Copy link
Member

pitrou commented Dec 3, 2025

Unrelated, but do we want to remove compatibility with very old Pandas versions at some point? Pandas 1.3.4 was released in 2021 and only provides wheels for Python 3.10 and earlier.

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