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')[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 – mulltiset tracking the number of occurrences of end activities
file_path (
str
) – target file path on disk to write the dfg object toencoding (
str
) – the encoding to be used (default: utf-8)
import pm4py log = pm4py.write_dfg(dfg, sa, ea, '<path_to_export_to>')