-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
ENH: add .normalize() to Timestamp? #8794
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
Comments
sure though I don't think is used much in the docs / maybe should have an example |
yes, indeed, |
I was thinking this the other day. Be careful because |
|
I think the fact that |
Agree, and that would be done with |
Although looking further I see |
I would think it should not do a straight replace, as this is causing the timezone issue? |
Yes, I was going to change this as a part of #5172. |
Although I think it belongs as it's own change so please feel free to go ahead (the solution is to replace |
Several things:
|
You will have to do it at some level (I think you are suggesting to override replace so that it does the right thing, but that is a larger API change). This method of stripping |
Some of my strong feelings about how we should be doing this stuff have been bumping up against reality lately. I'm still mulling point 2. |
Don't get me wrong, I agree that it doesn't feel right doing it this way. I'm open to suggestions about how to do normalize and deal with |
@ischwabacher Any thoughts/suggestions? I'm inclined to try and fix |
I would personally leave And tring to reuse the DatetimeIndex normalizing machinery, is that possible? As this already works correctly?
|
I guess I'm referring to holistically as in #5172 needs to do some hacks because dateutil uses |
I really, really wanted to be able to just say, "The Given that some operations on aware time representations do have to ask how to resolve ambiguities, I'm inclined to split point 2:
@jorisvandenbossche Try your example with this:
|
closed by #9623 |
From http://stackoverflow.com/questions/26882499/reset-time-part-of-a-pandas-timestamp#26882499
There is now a
DatetimeIndex.normalize()
method to set times to midnight.Would it be useful to also have this method available on the individual
Timestamp
object?Further, this method could also be added to the
.dt
accessor (udpate: for this, there already is a similar issue: #5502).The text was updated successfully, but these errors were encountered: