Skip to content

ENH: DatetimeProperties results seem to be inconsistent since missing milliseconds #49073 #49719

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

Closed
wants to merge 2 commits into from

Conversation

PedroPUCRIO
Copy link

I have added the millisecond feature to the Datetime function on Pandas. As it was discussed in the issue, it seemed inconsistent. However, I didn't change how the microseconds were being exhibited (with 6 digits instead of 3), not to break the code.

@mroeschke mroeschke added the Datetime Datetime data dtype label Nov 16, 2022
@@ -1874,6 +1898,7 @@ def to_julian_date(self) -> npt.NDArray[np.float64]:
self.hour
+ self.minute / 60
+ self.second / 3600
+ self.millisecond / 3600 / 10**3
Copy link
Member

Choose a reason for hiding this comment

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

Why was this added? I think self.microsecond should already include the milliseconds

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.

Thanks for the start:

  1. Could you add tests for this functionality?
  2. Could you also add this for Timestamp for symmetry?

Copy link
Member

@MarcoGorelli MarcoGorelli left a comment

Choose a reason for hiding this comment

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

thanks for working on this, but as mentioned in

#49073 (comment)

I think I'd be -1 on this

@MarcoGorelli
Copy link
Member

closing as per #49073 (comment) , but thanks for your PR!

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

Successfully merging this pull request may close these issues.

ENH: DatetimeProperties results seem to be inconsistent since missing milliseconds
3 participants