pm4py / pm4py-core

Public repository for the PM4Py (Process Mining for Python) project.
https://pm4py.fit.fraunhofer.de
GNU General Public License v3.0
722 stars 286 forks source link

AttributeError: 'EventLog' object has no attribute 'groupby' #240

Closed ulie50 closed 3 years ago

ulie50 commented 3 years ago

auto_filtered_log = variants_filter.apply_auto_filter(log) being applied to Log object returns an error File "C:\...\lib\site-packages\pm4py\algo\filtering\pandas\variants\variants_filter.py", line 59, in apply_auto_filter variants_df = case_statistics.get_variants_df(df, parameters=parameters) File "C:\...\lib\site-packages\pm4py\statistics\traces\generic\pandas\case_statistics.py", line 197, in get_variants_df new_df = df.groupby(case_id_glue)[activity_key].agg(lambda col: ",".join(pd.Series.to_list(col))).to_frame() AttributeError: 'EventLog' object has no attribute 'groupby''. I have checked that function is currently defined for dataframes, will it be in the future defined for Log objects as well as it is done with other "apply_auto_filter" functions?

ulie50 commented 3 years ago

Sorry, I have used method from pm4py.algo.filtering.pandas.variants but i needed pm4py.algo.filtering.log.variants