overlaps(self, other)
Two intervals overlap if they share a common point, including closed endpoints. Intervals that only have an open endpoint in common do not overlap.
Interval to check against for an overlap.
Boolean array positionally indicating where an overlap occurs.
Check elementwise if an Interval overlaps the values in the IntervalArray.
Interval.overlaps
Check whether two Interval objects overlap.
>>> data = [(0, 1), (1, 3), (2, 4)]This example is valid syntax, but we were not able to check execution
... intervals = pd.arrays.IntervalArray.from_tuples(data)
... intervals <IntervalArray> [(0, 1], (1, 3], (2, 4]] Length: 3, dtype: interval[int64, right]
>>> intervals.overlaps(pd.Interval(0.5, 1.5)) array([ True, True, False])
Intervals that share closed endpoints overlap:
This example is valid syntax, but we were not able to check execution>>> intervals.overlaps(pd.Interval(1, 3, closed='left')) array([ True, True, True])
Intervals that only have an open endpoint in common do not overlap:
This example is valid syntax, but we were not able to check execution>>> intervals.overlaps(pd.Interval(1, 2, closed='right')) array([False, True, False])See :
The following pages refer to to this document either explicitly or contain code examples using this.
pandas.core.arrays.interval.IntervalArray.contains
Hover to see nodes names; edges to Self not shown, Caped at 50 nodes.
Using a canvas is more power efficient and can get hundred of nodes ; but does not allow hyperlinks; , arrows or text (beyond on hover)
SVG is more flexible but power hungry; and does not scale well to 50 + nodes.
All aboves nodes referred to, (or are referred from) current nodes; Edges from Self to other have been omitted (or all nodes would be connected to the central node "self" which is not useful). Nodes are colored by the library they belong to, and scaled with the number of references pointing them