Split Sessions

Splits paths into sessions by defining session boundaries. Adds a session ID column and a session index column to the eventstream. At least one boundary mode must be provided. Modes can be combined.

Usage

# Split on inactivity timeout (30 minutes)
es.split_sessions(timeout=1800)

# Split on a separator event
es.split_sessions(separator="session_end")

# Split on explicit start/end events
es.split_sessions(start_event="session_start", end_event="session_end")

# Combine: separator + timeout
es.split_sessions(separator="session_end", timeout=3600)

Parameters

ParameterTypeDefaultDescription
session_colstr"session_id"Name of the new session ID column.
session_index_colstr"session_index"Name of the new session index column (integer, per path).
separatorstr | list[str] | NoneNoneEvent(s) that delimit sessions. Separator events are removed from the output.
start_eventstr | list[str] | NoneNoneEvent(s) that start a session. Must be paired with end_event.
end_eventstr | list[str] | NoneNoneEvent(s) that end a session. Must be paired with start_event.
timeoutint | float | NoneNoneInactivity gap in seconds after which a new session begins.
path_id_colstr | NoneNoneOverride the path ID column.
event_colstr | NoneNoneOverride the event column.