Skip to content

Commit

Permalink
fix(pm4py): fixed paths filter for Pandas
Browse files Browse the repository at this point in the history
fixed paths filter for Pandas
  • Loading branch information
fit-alessandro-berti committed Sep 22, 2021
1 parent a5a2409 commit 706d42c
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions pm4py/algo/filtering/pandas/paths/paths_filter.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ def apply(df: pd.DataFrame, paths: List[Tuple[str, str]], parameters: Optional[D
filt_dif_shifted = filt_df.shift(-1)
filt_dif_shifted.columns = [str(col) + '_2' for col in filt_dif_shifted.columns]
stacked_df = pd.concat([filt_df, filt_dif_shifted], axis=1)
stacked_df = stacked_df[stacked_df[case_id_glue] == stacked_df[case_id_glue + '_2']]
stacked_df["@@path"] = stacked_df[attribute_key] + "," + stacked_df[attribute_key + "_2"]
stacked_df = stacked_df[stacked_df["@@path"].isin(paths)]
i1 = df.set_index(case_id_glue).index
Expand Down

0 comments on commit 706d42c

Please sign in to comment.