pymovements.dataset.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 #
Calculate an event property for and add it as a column to the event dataframe.
- Parameters:
event_properties (str | tuple[str, dict[str, Any]] | list[str | tuple[str, dict[str, Any]]]) – The event properties to compute.
name (str | None) – Process only events that match the name. (default: None)
verbose (bool) – If
True
, show progress bar. (default: True)
- Raises:
InvalidProperty – If
property_name
is not a valid property. Seepymovements.events.event_properties
for an overview of supported properties.RuntimeError – If specified event name
name
is missing fromevents
.
- Returns:
Returns self, useful for method cascading.
- Return type: