-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
DOC: pandas.DateTimeIndex.to_frame #20139
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
Hello @ryananyangu! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on March 16, 2018 at 21:20 Hours UTC |
@ryananyangu can you edit the title of the PR to be "DOC: pandas.DateTimeIndex.to_frame" instead of "Jovixe"? That'll help us review it. Thanks! |
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 am personally not really sure about the added value of showing the same but with datetime values.
But the "See Also" is certainly a good addition
pandas/core/indexes/base.py
Outdated
|
||
See Also | ||
-------- | ||
pandas.Series.to_frame : Convert Series to DataFrame |
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
should go before examples. Also, Index
also have a .to_series()
method that is worth listing here.
I think the preferred option is to avoid using the pandas.
prefix in the `See Also section.
pandas/core/indexes/base.py
Outdated
2008-07-01 05:36:00 2008-07-01 05:36:00 | ||
2008-09-06 04:53:00 2008-09-06 04:53:00 | ||
2008-01-23 19:43:00 2008-01-23 19:43:00 | ||
Name: 0, dtype: datetime64[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.
I agree with @jorisvandenbossche, while the example is really nice, it adds a lot of reading for the users for the value it provides. I'd keep the examples as they were.
[ci skip]
Codecov Report
@@ Coverage Diff @@
## master #20139 +/- ##
==========================================
- Coverage 91.72% 91.7% -0.03%
==========================================
Files 150 150
Lines 49156 49152 -4
==========================================
- Hits 45090 45074 -16
- Misses 4066 4078 +12
Continue to review full report at Codecov.
|
Codecov Report
@@ Coverage Diff @@
## master #20139 +/- ##
=========================================
Coverage ? 91.7%
=========================================
Files ? 150
Lines ? 49152
Branches ? 0
=========================================
Hits ? 45074
Misses ? 4078
Partials ? 0
Continue to review full report at Codecov.
|
Thanks @ryananyangu ! |
Checklist for the pandas documentation sprint (ignore this if you are doing
an unrelated PR):
./scripts/validate_docstrings.py pandas.DatetimeIndex.to_frame
git diff upstream/master -u -- "*.py" | flake8 --diff
python doc/make.py --single pandas.DatetimeIndex.to_frame
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.