-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: Updating the timedeltas.seconds docstring for Issue #50969 #51522
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
rmhowe425
commented
Feb 21, 2023
- closes DOC: seconds attribute of timedelta surprises and no warning is given in the docs #50969
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.
thanks for working on this - I think all that's needed is to link total_seconds
in the See Also
section, something like
See Also
--------
Timedelta.components : Return all attributes with assigned values
(i.e. days, hours, minutes, seconds, milliseconds, microseconds,
nanoseconds).
Timedelta.total_seconds : Express the TimeDelta as total number of seconds.
I have updated the documentation based on your feedback. Thanks for the help! |
pandas/_libs/tslibs/timedeltas.pyx
Outdated
Whenever a negative timedelta is calculate, the `seconds` method is represented | ||
as the difference of 86400 seconds (24 hours) minus the absolute value | ||
of the calculated timedelta. To retrieve the expected output, the | ||
`total_seconds()` method should be called instead |
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.
I think we can remove this, the 'see also' should be sufficient
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.
Okay! Removing lines 1068 - 1071 and pushing again
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.
@MarcoGorelli I just updated the docstring and removed lines 1068-1071
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.
thanks @rmhowe425