-
-
Notifications
You must be signed in to change notification settings - Fork 18.5k
DOC: update the pandas.Series.dt.total_seconds docstring #20159
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
DOC: update the pandas.Series.dt.total_seconds docstring #20159
Conversation
…econds DOC: Improved the docstring of pandas.Series.dt.total_seconds
pandas/core/indexes/timedeltas.py
Outdated
------- | ||
s : pandas.Series | ||
a series of type `float64`. | ||
|
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.
See Also
section is missing. Maybe it could be useful to reference datetime
documentation.
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.
Added.
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.
Looks good to me! (added minor comment)
@TomAugspurger we have again the problem of index vs .dt accessor. Did we already have a solution for this? (the current PR now documents it like .dt)
pandas/core/indexes/timedeltas.py
Outdated
Returns | ||
------- | ||
s : pandas.Series | ||
a series of type `float64`. |
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.
"a series" -> "Series"
Codecov Report
@@ Coverage Diff @@
## master #20159 +/- ##
==========================================
- Coverage 91.72% 91.7% -0.03%
==========================================
Files 150 150
Lines 49156 49165 +9
==========================================
- Hits 45090 45087 -3
- Misses 4066 4078 +12
Continue to review full report at Codecov.
|
Made this generic for TimedeltaIndex and Series[timedelta64]. |
Yes, that looks like a good solution |
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
scripts/validate_docstrings.py <your-function-or-method>
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single <your-function-or-method>
Please include the output of the validation script below between the "```" ticks:
If the validation script still gives errors, but you think there is a good reason
to deviate in this case (and there are certainly such cases), please state this
explicitly.
Checklist for other PRs (remove this part if you are doing a PR for the pandas documentation sprint):
git diff upstream/master -u -- "*.py" | flake8 --diff