pm4py.utils.parse_event_log_string#
- pm4py.utils.parse_event_log_string(traces: Collection[str], sep: str = ',', activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', case_id_key: str = 'case:concept:name') DataFrame [source]#
Parse a collection of traces expressed as strings (e.g., [“A,B,C,D”, “A,C,B,D”, “A,D”]) to a log object (Pandas dataframe)
- Parameters:
traces – Collection of traces expressed as strings
sep (
str
) – Separator used to split the activities of a string traceactivity_key (
str
) – The attribute that should be used as activitytimestamp_key (
str
) – The attribute that should be used as timestampcase_id_key (
str
) – The attribute that should be used as case identifier
- Return type:
pd.DataFrame
import pm4py dataframe = pm4py.parse_event_log_string(["A,B,C,D", "A,C,B,D", "A,D"])