Skip to content

merge_intervals builtin

merge_intervals(
    left, right, *, hole="HOLE_ID", from_="FROM", to="TO"
)

Splits two interval tables (e.g. assays and geology) at the union of their boundaries, hole by hole. The result has the hole, from and to columns followed by every other column of both tables, null where a table has no interval; right columns that clash get a _right suffix. Overlapping intervals within a table raise ValueError naming the first few holes; resolve them before merging.

used in