pm4py.read.read_xes#
- pm4py.read.read_xes(file_path: str, variant: str | None = None, return_legacy_log_object: bool = False, encoding: str = 'utf-8', **kwargs) DataFrame | EventLog [source]#
Reads an event log stored in XES format (see xes-standard) Returns a table (
pandas.DataFrame
) view of the event log.- Parameters:
file_path (
str
) – file path of the event log (.xes
file) on diskvariant – 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:
DataFrame
import pm4py log = pm4py.read_xes("<path_to_xes_file>")