Skip to content
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

ENH: initial support for non-nano Timestamp #46839

Merged
merged 4 commits into from
Apr 27, 2022

Conversation

jbrockmendel
Copy link
Member

  • 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 an entry in the latest doc/source/whatsnew/vX.X.X.rst file if fixing a bug or adding a new feature.

Copy link
Member

@mroeschke mroeschke left a comment

Choose a reason for hiding this comment

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

So just to confirm, this PR just allows preserving the resolution from np.datetime64 objects? Do you have plans to support passing in resolution from the Timestamp constructor too?

@mroeschke mroeschke added Enhancement Timeseries Non-Nano datetime64/timedelta64 with non-nanosecond resolution labels Apr 22, 2022
@mroeschke mroeschke added this to the 1.5 milestone Apr 22, 2022
@jbrockmendel
Copy link
Member Author

So just to confirm, this PR just allows preserving the resolution from np.datetime64 objects?

Correct. This way I can incrementally implement tests for tznaive cases, then expand to tzaware cases, etc.

Do you have plans to support passing in resolution from the Timestamp constructor too?

Yes, though the exact API is still up in the air (xref #46587). On last week's dev call we were leaning towards a new keyword, though im still reticent, so punting on this for the time being.

@jbrockmendel
Copy link
Member Author

@jreback gentle ping; nothing time-sensitive, but many more steps to go (ditto #46847, #46828, #46811, #46803)

# Constructors

@classmethod
def _from_dt64(cls, dt64: np.datetime64):
Copy link
Contributor

Choose a reason for hiding this comment

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

ideally can return type (followon)

@jreback jreback merged commit d0e3820 into pandas-dev:main Apr 27, 2022
@jbrockmendel jbrockmendel deleted the enh-nano-ts-2 branch April 27, 2022 15:02
yehoshuadimarsky pushed a commit to yehoshuadimarsky/pandas that referenced this pull request Jul 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement Non-Nano datetime64/timedelta64 with non-nanosecond resolution Timeseries
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants