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
| Parameter | Type | Default | Description |
|---|---|---|---|
session_col | str | "session_id" | Name of the new session ID column. |
session_index_col | str | "session_index" | Name of the new session index column (integer, per path). |
separator | str | list[str] | None | None | Event(s) that delimit sessions. Separator events are removed from the output. |
start_event | str | list[str] | None | None | Event(s) that start a session. Must be paired with end_event. |
end_event | str | list[str] | None | None | Event(s) that end a session. Must be paired with start_event. |
timeout | int | float | None | None | Inactivity gap in seconds after which a new session begins. |
path_id_col | str | None | None | Override the path ID column. |
event_col | str | None | None | Override the event column. |