def get_attributes(log): """ Returns the attributes at the event level of the log Parameters --------------- log Log object Returns --------------- attributes_list List of attributes contained in the log """ if check_is_dataframe(log): check_dataframe_columns(log) return list(log.columns) else: from pm4py.statistics.attributes.log import get return list(get.get_all_event_attributes_from_log(log))
def get_event_attributes(log: Union[EventLog, pd.DataFrame]) -> List[str]: """ Returns the attributes at the event level of the log Parameters --------------- log Log object Returns --------------- attributes_list List of attributes contained in the log """ if type(log) not in [pd.DataFrame, EventLog, EventStream]: raise Exception("the method can be applied only to a traditional event log!") if check_is_pandas_dataframe(log): check_pandas_dataframe_columns(log) return list(log.columns) else: from pm4py.statistics.attributes.log import get return list(get.get_all_event_attributes_from_log(log))