-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: updated docstring for nanoseconds function per doc guidelines #21065
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
Changes from 3 commits
4dcb4b4
e0ae113
11a9266
04e204b
5ac6ef1
fb45759
b0977f4
85bcb52
841611e
4237391
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -791,9 +791,16 @@ cdef class _Timedelta(timedelta): | |
@property | ||
def nanoseconds(self): | ||
""" | ||
Number of nanoseconds (>= 0 and less than 1 microsecond). | ||
Return the number of nanoseconds (n), where 0 <= n < 1 microsecond. | ||
|
||
Returns | ||
------- | ||
int : Number of nanoseconds | ||
|
||
.components will return the shown components | ||
See Also | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe add a reference to the other component attributes |
||
-------- | ||
Timedelta.components : Return all attributes with assigned values (i.e. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Put a period at the end of the description here. This isn't enforced and is inconsistent in the docs but should eventually be standardized |
||
days, seconds, microseconds, nanoseconds) | ||
""" | ||
self._ensure_components() | ||
return self._ns | ||
|
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.
Keep the type and description on separate lines. Make sure you indent the description and add a period at the end of it.