ENH: add Timestamp.to_datetime64 by shoyer · Pull Request #9255 · pandas-dev/pandas (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation8 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
This PR adds a Timestamp.to_datetime64() method to complement the Timedelta.to_timedelta64() method I added in #8884. It is a continuation of the aborted #8916.
Arguably, there should also be the alias Timestamp.values to complement the series property but I haven't added that yet.
hmm, its called Timestamp.value; you think .values should also be there? why? (its not a big deal, but curious why)
Timstamp.value is an integer; .values would be a np.datetime64 object, like the datetime64 .values on arrays.
Any comments on this PR? (Tests are green)
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
add the issue as a comment here
trivial comment. looks good otherwise. you are picking up pieces from those other pr's yes?
@jreback By other PRs do you mean #8916? Yes, probably, eventually. Not entirely sure it's possible though given numpy datetime64 limitations :).
I wrote this one because I need it for the next PR I'm submitting tonight.
@shoyer yep. you had some good stuff in there IIRC.
shoyer added a commit that referenced this pull request
ENH: add Timestamp.to_datetime64