-
-
Notifications
You must be signed in to change notification settings - Fork 19k
API: restore full datetime.timedelta compat with Timedelta w.r.t. seconds/microseconds accessors (GH9185, GH9139) #9257
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
Conversation
I think this should bring us back to the previous behavior. |
pandas/tseries/tdi.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
'total' is also not fully correct in the sense it is only a part of the timedelta expressed in seconds.
The docstring of datetime.timedelta.seconds
says it as " Number of seconds (>= 0 and less than 1 day)."
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And maybe add a reference to components
to have only the seconds part
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
I think we also need to update the timedelta docs: http://pandas.pydata.org/pandas-docs/stable/timedeltas.html |
all comments have been addressed. |
86c8c05
to
6e618d7
Compare
doc/source/whatsnew/v0.16.0.txt
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thru -> through
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
here is still nanoseconds as removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
8c97b7a
to
bf0354d
Compare
…onds/microseconds accessors (GH9185, GH9139) +
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry...was editing something else
OK, looks good to me! |
API: restore full datetime.timedelta compat with Timedelta w.r.t. seconds/microseconds accessors (GH9185, GH9139)
Thanks Jeff! |
closes #9185
closes #9139