Skip to content

Add flexible deserialization for datetime fill values #3031

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

moradology
Copy link
Contributor

This PR addresses a backwards incompatibility issue created in recent standardization of the fill_value serialization/deserialization work. It does so by adopting a flexible decoding approach that takes either the minimum signed 64bit value or else 'NaT' as meaning Not a Time while sticking to writing fill values as 'NaT'.

Fixes #3028

TODO:

  • Add unit tests and/or doctests in docstrings
  • Add docstrings and API docs for any new/modified user-facing classes and functions
  • New/modified features documented in docs/user-guide/*.rst
  • Changes documented as a new file in changes/
  • GitHub Actions have all passed
  • Test coverage is 100% (Codecov passes)

@github-actions github-actions bot added the needs release notes Automatically applied to PRs which haven't added release notes label May 1, 2025
@github-actions github-actions bot removed the needs release notes Automatically applied to PRs which haven't added release notes label May 1, 2025
pass
elif dtype.kind in "M":
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
elif dtype.kind in "M":
elif dtype.kind in ("M", "m"):

handle timedelta64 as well

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

serializing not a time (NaT) to metadata
2 participants