pm4py.utils.project_on_event_attribute#

pm4py.utils.project_on_event_attribute(log: EventLog | DataFrame, attribute_key='concept:name', case_id_key=None) List[List[str]][source]#

Projects the event log onto a specified event attribute. The result is a list containing a list for each case, where each case is represented as a list of values for the specified attribute.

Example:

`python pm4py.project_on_event_attribute(log, "concept:name") `

Output:

```python [

[‘register request’, ‘examine casually’, ‘check ticket’, ‘decide’, ‘reinitiate request’, ‘examine thoroughly’, ‘check ticket’, ‘decide’, ‘pay compensation’], [‘register request’, ‘check ticket’, ‘examine casually’, ‘decide’, ‘pay compensation’], [‘register request’, ‘examine thoroughly’, ‘check ticket’, ‘decide’, ‘reject request’], [‘register request’, ‘examine casually’, ‘check ticket’, ‘decide’, ‘pay compensation’], [‘register request’, ‘examine casually’, ‘check ticket’, ‘decide’, ‘reinitiate request’, ‘check ticket’, ‘examine casually’, ‘decide’, ‘reinitiate request’, ‘examine casually’, ‘check ticket’, ‘decide’, ‘reject request’], [‘register request’, ‘check ticket’, ‘examine thoroughly’, ‘decide’, ‘reject request’]

]#

type attribute_key:

str

param log:

Event log or Pandas DataFrame.

param attribute_key:

The attribute to be used for projection.

param case_id_key:

(Optional) The attribute to be used as case identifier.

return:

A list of lists containing the projected attribute values for each case.

rtype:

List[List[str]]

import pm4py

list_list_activities = pm4py.project_on_event_attribute(dataframe, 'concept:name')