Skip to content

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

Merged
merged 7 commits into from
Feb 21, 2023
Merged

DOC: Updating the timedeltas.seconds docstring for Issue #50969 #51522

merged 7 commits into from
Feb 21, 2023

Conversation

rmhowe425
Copy link
Contributor

@rmhowe425 rmhowe425 changed the title Updating the timedeltas.seconds docstring for Issue #50969 DOC: Updating the timedeltas.seconds docstring for Issue #50969 Feb 21, 2023
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 - 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.

@rmhowe425
Copy link
Contributor Author

@MarcoGorelli.

I have updated the documentation based on your feedback. Thanks for the help!

Comment on lines 1068 to 1071
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
Copy link
Member

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

Copy link
Contributor Author

@rmhowe425 rmhowe425 Feb 21, 2023

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

Copy link
Contributor Author

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

@mroeschke mroeschke added Docs Timedelta Timedelta data type labels Feb 21, 2023
@MarcoGorelli MarcoGorelli modified the milestones: 2.0, 2.1 Feb 21, 2023
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 @rmhowe425

@MarcoGorelli MarcoGorelli merged commit ec210cc into pandas-dev:main Feb 21, 2023
@rmhowe425 rmhowe425 deleted the richard/dev branch February 21, 2023 23:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Docs Timedelta Timedelta data type
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DOC: seconds attribute of timedelta surprises and no warning is given in the docs
3 participants