PM4Py is an open-source process mining library for Python. It supports process discovery, conformance checking, enhancement, and analysis of event logs. The current version is 2.7.22.2, with an active development cadence of about monthly releases.
pip install pm4pyVerified import paths — ran on the pinned version, not inferred.
Basic process discovery from a CSV event log using the Inductive Miner.
Use the simplified interface introduced in 2.x: functions like pm4py.discover_petri_net_inductive(), pm4py.conformance_token_based_replay(), etc. Check the official documentation for 2.x.
Use pm4py.read.read_xes(file_path) or pm4py.read_csv(csv_path) and use pm4py.discover_heuristics_petri_net() instead.
Convert Polars dataframes to Pandas using .to_pandas() before passing to PM4Py functions unless you are using new Polars-specific methods.
Use the legacy API: from pm4py.algo.discovery.alpha import algorithm as alpha_miner net, im, fm = alpha_miner.apply(log)
Ensure your CSV has columns named 'case:concept:name', 'concept:name', and 'time:timestamp', or rename them before calling format_dataframe.
No dependency data recorded yet.