Skip to content

Conversation

@jbrockmendel
Copy link
Member

@jbrockmendel jbrockmendel commented Dec 1, 2025

  • closes #xxxx (Replace xxxx with the GitHub issue number)
  • Tests added and passed if fixing a bug or adding a new feature
  • All code checks passed.
  • Added type annotations to new arguments/methods/functions.
  • Added an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.
  • If I used AI to develop this pull request, I prompted it to follow AGENTS.md.

Surfaced by #63196, which currently xfails test_preserve_timedeltaindex_type. This implements a fix.

@jorisvandenbossche jorisvandenbossche added IO HDF5 read_hdf, HDFStore Timedelta Timedelta data type Non-Nano datetime64/timedelta64 with non-nanosecond resolution labels Dec 1, 2025
Copy link
Member

@jorisvandenbossche jorisvandenbossche left a comment

Choose a reason for hiding this comment

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

Looks good!

The consequence is that a file written with 3.0 (with a timedelta column) won't be readable by older pandas versions?
(although right now if you write non-nanos, they just come back as wrong values)

Can you add a whatsnew note as you had in #55622?

Comment on lines 233 to 234
# TODO: other timedelta64 units? 2025-11-30 only
# test_append_with_timedelta gets here
Copy link
Member

Choose a reason for hiding this comment

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

Could parametrize test_append_with_timedelta for the different units? (or is there already other coverage?)

Copy link
Member Author

Choose a reason for hiding this comment

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

good idea, updated.

@jorisvandenbossche jorisvandenbossche added this to the 3.0 milestone Dec 1, 2025
@jbrockmendel
Copy link
Member Author

The consequence is that a file written with 3.0 (with a timedelta column) won't be readable by older pandas versions?
(although right now if you write non-nanos, they just come back as wrong values)

Correct.

Can you add a whatsnew note as you had in #55622?

Done.

@jorisvandenbossche jorisvandenbossche merged commit 92a97b9 into pandas-dev:main Dec 2, 2025
36 of 41 checks passed
@jorisvandenbossche
Copy link
Member

Thanks!

@jbrockmendel jbrockmendel deleted the bug-td-pytables branch December 2, 2025 15:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

IO HDF5 read_hdf, HDFStore Non-Nano datetime64/timedelta64 with non-nanosecond resolution Timedelta Timedelta data type

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants