str, variant: Optional[str] = None, return_legacy_log_object: bool = False, encoding: str = 'utf-8', **kwargs) Union[DataFrame, EventLog][source]#

Reads an event log stored in XES format (see xes-standard) Returns a table (pandas.DataFrame) view of the event log.

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

  • variant – the variant of the importer to use. “iterparse” => traditional XML parser; “line_by_line” => text-based line-by-line importer ; “chunk_regex” => chunk-of-bytes importer (default); “iterparse20” => XES 2.0 importer

  • return_legacy_log_object (bool) – boolean value enabling returning a log object (default: False)

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

Return type:


import pm4py

log = pm4py.read_xes("<path_to_xes_file>")