Skip to content

Comments

feat!: Change Pandas timestamp resolution to ms for timestamp columns#2485

Draft
MortGron wants to merge 1 commit intopysdk-release-v8from
pandas-timestamp-resolution
Draft

feat!: Change Pandas timestamp resolution to ms for timestamp columns#2485
MortGron wants to merge 1 commit intopysdk-release-v8from
pandas-timestamp-resolution

Conversation

@MortGron
Copy link
Contributor

@MortGron MortGron commented Feb 22, 2026

Description

Currently when using to_pandas on list like objects a timestamp resolution of 'ns' is enforced. In Pandas v3 the timestamp resolution is to a much larger extent inferred from the input data, where Pandas v2 would automatically set resolution 'ns'. CDF has a resolution of 'ms', so it would make sense for the to_pandas methods to also convert timestamp columns to ms.

An example where keeping resolution 'ns' would be inconenient in Pandas v3 is when using the from pandas.testing import assert_frame_equal where the resolution of timestamp columns are compared.

Another reason why chaning the resolution of columns to 'ms' would be convenient, is that a resolution of 'ms' is already set for single objects received from CDF. Only list like objects currently has a resolution of 'ns'.

Checklist:

  • Tests added/updated.
  • Documentation updated. Documentation is generated from docstrings - these must be updated according to your change.
    If a new method has been added it should be referenced in cognite.rst in order to generate docs based on its docstring.
  • The PR title follows the Conventional Commit spec.

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.

1 participant