pm4py.write.write_xes#

pm4py.write.write_xes(log: EventLog | DataFrame, file_path: str, case_id_key: str = 'case:concept:name', extensions: Collection[XESExtension] | None = None, encoding: str = 'utf-8', **kwargs) None[source]#

Writes an event log to disk in the XES format (see xes-standard)

Parameters:
  • log – log object (pandas.DataFrame) that needs to be written to disk

  • file_path (str) – target file path of the event log (.xes file) on disk

  • case_id_key (str) – column key that identifies the case identifier

  • extensions – extensions defined for the event log

  • encoding (str) – the encoding to be used (default: utf-8)

import pm4py

pm4py.write_xes(log, '<path_to_export_to>', case_id_key='case:concept:name')