pm4py.write.write_dfg#
- pm4py.write.write_dfg(dfg: Dict[Tuple[str, str], int], start_activities: Dict[str, int], end_activities: Dict[str, int], file_path: str, encoding: str = 'utf-8') None [source]#
Writes a directly follows graph (DFG) object to disk in the
.dfg
format.- Parameters:
dfg – Directly follows relation (multiset of activity-activity pairs).
start_activities – Multiset tracking the number of occurrences of start activities.
end_activities – Multiset tracking the number of occurrences of end activities.
file_path (
str
) – Target file path on disk to write the DFG object to.encoding (
str
) – The encoding to be used (default: utf-8).
import pm4py pm4py.write_dfg(dfg, start_activities, end_activities, '<path_to_export_to>')