Immutable index of intervals that are closed on the same side.
Array-like (ndarray, DateTimeArray
, TimeDeltaArray
) containing Interval objects from which to build the IntervalIndex.
Whether the intervals are closed on the left-side, right-side, both or neither.
If None, dtype will be inferred.
Copy the input data.
Name to be stored in the index.
Verify that the IntervalIndex is valid.
Attributes
Methods
See also
Index
The base pandas Index type.
Interval
A bounded slice-like interval; the elements of an IntervalIndex.
interval_range
Function to create a fixed frequency IntervalIndex.
cut
Bin values into discrete Intervals.
qcut
Bin values into equal-sized Intervals based on rank or sample quantiles.
Notes
See the user guide for more.
Examples
A new IntervalIndex
is typically constructed using interval_range()
:
>>> pd.interval_range(start=0, end=5) IntervalIndex([(0, 1], (1, 2], (2, 3], (3, 4], (4, 5]], dtype='interval[int64, right]')
It may also be constructed using one of the constructor methods: IntervalIndex.from_arrays()
, IntervalIndex.from_breaks()
, and IntervalIndex.from_tuples()
.
See further examples in the doc strings of interval_range
and the mentioned constructor methods.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4