pm4py.utils.rebase#
- pm4py.utils.rebase(log_obj: EventLog | EventStream | DataFrame, case_id: str = 'case:concept:name', activity_key: str = 'concept:name', timestamp_key: str = 'time:timestamp', start_timestamp_key: str = 'start_timestamp', timest_format: str | None = None) EventLog | EventStream | DataFrame [source]#
Re-base the log object, changing the case ID, activity and timestamp attributes.
- Parameters:
log_obj – Log object
case_id (
str
) – Case identifieractivity_key (
str
) – Activitytimestamp_key (
str
) – Timestampstart_timestamp_key (
str
) – Start timestamptimest_format – Timestamp format that is provided to Pandas
- Return type:
Union[EventLog, EventStream, pd.DataFrame]
import pm4py rebased_dataframe = pm4py.rebase(dataframe, case_id='case:concept:name', activity_key='concept:name', timestamp_key='time:timestamp')