pymovements.Dataset.compute_event_properties#
- Dataset.compute_event_properties(event_properties: str | tuple[str, dict[str, Any]] | list[str | tuple[str, dict[str, Any]]], name: str | None = None, verbose: bool = True) Dataset[source]#
Calculate an event property and add it as a column to the event dataframe.
- Parameters:
- Raises:
UnknownMeasure – If
event_propertiesincludes an unknwon measure. See Sample Measures and Event Measures for an overview of supported measures.RuntimeError – If specified event name
nameis missing fromevents.ValueError – If the computed property already exists in the event dataframe.
- Returns:
Returns self, useful for method cascading.
- Return type: