-
-
Notifications
You must be signed in to change notification settings - Fork 17.9k
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: Further improvements for IntervalIndex and Interval #17714
Doc: Further improvements for IntervalIndex and Interval #17714
Conversation
Hello @topper-123! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on September 29, 2017 at 12:08 Hours UTC |
1e9f666
to
1a76fca
Compare
Codecov Report
@@ Coverage Diff @@
## master #17714 +/- ##
==========================================
- Coverage 91.27% 91.25% -0.02%
==========================================
Files 163 163
Lines 49765 49783 +18
==========================================
+ Hits 45421 45430 +9
- Misses 4344 4353 +9
Continue to review full report at Codecov.
|
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/_libs/interval.pyx
Outdated
Examples | ||
-------- | ||
>>> abc = pd.Interval(left='a', right='c', closed='both') | ||
>>> 'b' in abc |
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 would also show the abc (so you see the repr)
(and personally I would find a integer (numeric) example better? (more common?))
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.
Ok, I see that, I've changed it
pandas/core/indexes/interval.py
Outdated
@@ -105,8 +105,10 @@ class IntervalIndex(IntervalMixin, Index): | |||
|
|||
.. versionadded:: 0.20.0 | |||
|
|||
Warning: the indexing behaviors are provisional and may change in | |||
a future version of pandas. | |||
.. Warning:: |
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 think it is with a lower case W
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.
changed
1a76fca
to
6fd0700
Compare
pandas/_libs/interval.pyx
Outdated
>>> pd.Timestamp('2017-01-01 00:00') in year_2017 | ||
True | ||
|
||
Note |
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.
this doesn't actually belong here. Yes its useful info but we can't possibly list all these kinds of references, nor do we, the See Also is enough.
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.
It's been removed.
6fd0700
to
0e27cd4
Compare
lgtm. ping on green. |
ping @jreback at green (I assume the failure in CircleCI has nothin to do with my PR). |
I've been seeing this compilation error fairly regularly:
I'll open a separate issue to track it. |
* 'master' of github.com:pandas-dev/pandas: (188 commits) Separate out _convert_datetime_to_tsobject (pandas-dev#17715) DOC: remove whatsnew note for xref pandas-dev#17131 BUG: Regression in .loc accepting a boolean Index as an indexer (pandas-dev#17738) DEPR: Deprecate cdate_range and merge into bdate_range (pandas-dev#17691) CLN: replace %s syntax with .format in pandas.core: categorical, common, config, config_init (pandas-dev#17735) Fixed the memory usage explanation of categorical in gotchas from O(nm) to O(n+m) (pandas-dev#17736) TST: add backward compat for offset testing for pickles (pandas-dev#17733) remove unused time conversion funcs (pandas-dev#17711) DEPR: Deprecate convert parameter in take (pandas-dev#17352) BUG:Time Grouper bug fix when applied for list groupers (pandas-dev#17587) BUG: Fix some PeriodIndex resampling issues (pandas-dev#16153) BUG: Fix unexpected sort in groupby (pandas-dev#17621) DOC: Fixed typo in documentation for 'pandas.DataFrame.replace' (pandas-dev#17731) BUG: Fix series rename called with str altering name rather index (GH17407) (pandas-dev#17654) DOC: Add examples for MultiIndex.get_locs + cleanups (pandas-dev#17675) Doc improvements for IntervalIndex and Interval (pandas-dev#17714) BUG: DataFrame sort_values and multiple "by" columns fails to order NaT correctly Last of the timezones funcs (pandas-dev#17669) Add missing file to _pyxfiles, delete commented-out (pandas-dev#17712) update imports of DateParseError, remove unused imports from tslib (pandas-dev#17713) ...
git diff upstream/master -u -- "*.py" | flake8 --diff
This follows #17706. Further changes are:
IntervalIndex
andInterval
.Interval
IntervalIndex
is now parsed properly.from_*
metods into one line.cut
andqcut
to 'See also'This will conclude my contributions to
IntervalIndex
.