pm4py.utils.rebase(log_obj: Union[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: Optional[str] = None) Union[EventLog, EventStream, DataFrame][source]#

Re-base the log object, changing the case ID, activity and timestamp attributes.

  • log_obj – Log object

  • case_id (str) – Case identifier

  • activity_key (str) – Activity

  • timestamp_key (str) – Timestamp

  • start_timestamp_key (str) – Start timestamp

  • timest_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')