slice
Keeps a range of events within the interval [begin, end)
stepping by stride
.
Description
The slice
operator selects a range of events from the input. The semantics of
the operator match Python's array slicing.
Take care when using this operator with large inputs.
begin = int (optional)
The beginning (inclusive) of the range to keep. Use a negative number to count from the end.
end = int (optional)
The end (exclusive) of the range to keep. Use a negative number to count from the end.
stride = int (optional)
The number of elements to advance before the next element. Use a negative number to count from the end, effectively reversing the stream.
Examples
Get the second 100 events:
Get the last five events:
Skip the last ten events:
Return the last 50 events, except for the last 2:
Skip the first and the last event:
Return every second event starting from the tenth:
Return all but the last five events in reverse order: