Preprocessing¶
API documentation for markovclick.preprocessing
.
Functions for preprocessing clickstream datasets
-
class
markovclick.preprocessing.
Sessionise
(df, unique_id_col: str, datetime_col: str, session_timeout: int = 30)[source]¶ Class with functions to sessionise a pandas DataFrame containing clickstream data.
-
assign_sessions
(n_jobs: int = 1)[source]¶ Assigns unique session IDs to individual clicks that form the sessions. Supports parallel processing through setting
n_jobs
to higher than 1.Parameters: n_jobs (int, optional) – Defaults to 1. If 2 or higher, enables parallel processing. Returns: Returns sessionised DataFrame, with session IDs stored in session_UUID
column.Return type: pd.DataFrame
-
datetime_col
¶ Provides access to
datetime_col
attribute
-
df
¶ Provides access to
df
attribute
-
session_timeout
¶ Provides access to
session_timeout
attribute
-
unique_id_col
¶ Provides access to
unique_id_col
attribute
-