Spaces:
Sleeping
Sleeping
Fix DFG tab: drop case-less events before pm4py conversion
Browse filesThe native OCEL 2.0 events parquet has ~33% case-less events
(shared-resource activities); pm4py's discover_dfg requires a
case ID per event. Dropping them in load_data() so the first
tab renders cleanly without affecting the other tabs.
14 unmodified lines151617181920212214 unmodified linesds = load_dataset("VynFi/vynfi-supply-chain-ocel", "events", split="train")df = ds.to_pandas()df["timestamp"] = pd.to_datetime(df["timestamp"], errors="coerce")# Drop rows with NaT timestamps (pm4py can't handle them)df = df.dropna(subset=["timestamp"])# Rename for pm4py — use safe names without colons for displaydf = df.rename(columns={"case_id": "case_id_pm",14 unmodified lines15161718192021222314 unmodified linesds = load_dataset("VynFi/vynfi-supply-chain-ocel", "events", split="train")df = ds.to_pandas()df["timestamp"] = pd.to_datetime(df["timestamp"], errors="coerce")# pm4py needs both timestamp and case_id present; native OCEL 2.0 has# case-less events for shared-resource activities, drop them here.df = df.dropna(subset=["timestamp", "case_id"])# Rename for pm4py — use safe names without colons for displaydf = df.rename(columns={"case_id": "case_id_pm",
app.py+3-2