-
-
Notifications
You must be signed in to change notification settings - Fork 18.4k
DOC: Improved doc string for IntervalIndex + related changes #17706
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: Improved doc string for IntervalIndex + related changes #17706
Conversation
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.
Cool!
pandas/core/indexes/interval.py
Outdated
closed='right', dtype='interval[int64]') | ||
|
||
It may also be constructed using one of the constructor | ||
methods :meth:`IntervalIndex.from_arrays``, |
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.
double -> single closing backtick
pandas/core/indexes/interval.py
Outdated
It may also be constructed using one of the constructor | ||
methods :meth:`IntervalIndex.from_arrays``, | ||
:meth:`IntervalIndex.from_breaks``, :meth:`IntervalIndex.from_intervals` | ||
and :meth:`IntervalIndex.from_tuples``. |
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.
and the above two lines as well
pandas/core/indexes/interval.py
Outdated
|
||
>>> pd.IntervalIndex.from_tuples([(0, 1), (1,2)]) | ||
IntervalIndex([(0, 1], (1, 2]], | ||
closed='right', dtype='interval[int64]') |
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.
We could add here 'See also' to the other from_
constructors
pandas/core/indexes/interval.py
Outdated
See Also | ||
-------- | ||
Index | ||
Interval : A bounded slice-like interval | ||
interval_range : Function to create a fixed frequency IntervalIndex | ||
IntervalIndex.from_arrays : Construct an IntervalIndex from a a left and |
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 a'
pandas/core/indexes/interval.py
Outdated
right array | ||
IntervalIndex.from_breaks : Construct an IntervalIndex from an array of | ||
splits | ||
IntervalIndex.from_intervals : Construct an IntervalIndex from a array of |
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 -> an
Codecov Report
@@ Coverage Diff @@
## master #17706 +/- ##
==========================================
+ Coverage 91.24% 91.25% +<.01%
==========================================
Files 163 163
Lines 49766 49765 -1
==========================================
Hits 45411 45411
+ Misses 4355 4354 -1
Continue to review full report at Codecov.
|
ef3d7c0
to
2deb7ac
Compare
Hello @topper-123! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on September 28, 2017 at 15:55 Hours UTC |
2deb7ac
to
5615792
Compare
Ok, all comments taken care of. |
Hi @jorisvandenbossche . I've found, that the output string from the examples in the In addition, the time-based examples for |
9c7883f
to
7dfad50
Compare
Yes, the repr was changes during the PR process of adding the IntervalIndex, so not examples were updated for that |
@topper-123 Thanks a lot! |
git diff upstream/master -u -- "*.py" | flake8 --diff
This PR has Improvements for the doc string for
IntervalIndex
+ related changes