Skip to content

API: fix milliseconds accessor in Timestamp/DatetimeIndex #8696

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
jreback opened this issue Oct 31, 2014 · 4 comments
Closed

API: fix milliseconds accessor in Timestamp/DatetimeIndex #8696

jreback opened this issue Oct 31, 2014 · 4 comments
Labels
API Design Datetime Datetime data dtype
Milestone

Comments

@jreback
Copy link
Contributor

jreback commented Oct 31, 2014

This results in an API change, so holding off till later

https://github.com/jreback/pandas/tree/milliseconds

@jreback jreback added Datetime Datetime data dtype API Design labels Oct 31, 2014
@jreback jreback added this to the 0.16.0 milestone Oct 31, 2014
@jorisvandenbossche
Copy link
Member

@jreback This comes back to the datetime.datetime API (https://docs.python.org/2/library/datetime.html#datetime-objects) which stores only the microseconds (for the sub-second level).

So it is the choice between following that API as is done now (as we say Timestamp is a subclass and interchanable with it), or to deviate from it to provide a maybe more logical and full attribute support (millisecond, microsecond, nanosecond).

It is a bit the same discussion as we had with Timedelta

@jreback
Copy link
Contributor Author

jreback commented Oct 31, 2014

yep, its somewhat inconsistent now as nanoseconds returns not the total but up to 999 nanoseconds, while microseconds returns up to 999999, and milliseconds is undefined.

so let's think about it and maybe change in 0.16

@shoyer
Copy link
Member

shoyer commented Jan 29, 2015

@jreback This is settled by decision on #9185, yes? I think we can close this as "won't fix".

@jreback
Copy link
Contributor Author

jreback commented Jan 29, 2015

yep

@jreback jreback closed this as completed Jan 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
API Design Datetime Datetime data dtype
Projects
None yet
Development

No branches or pull requests

3 participants