in frauddetector/profiler.py [0:0]
def __check_column_in_dataframe(self, data, event_column="EVENT_LABEL", timestamp_column="EVENT_TIMESTAMP"):
"""Check if columns exist in DataFrame.
Args:
data (pandas.core.frame.DataFrame): panda's dataframe to check
event_column (str): column that contains the target event
timestamp_column (str): column that contains the timestamp
Returns:
column_in_df (boolean): Flag to tell if the column
"""
data_columns = data.columns
column_in_df = True
if event_column not in data_columns:
logging.warning(f"{event_column} can't be found as a column in your DataFrame! Columns found in DataFrame:")
logging.warning(f"{data_columns}")
column_in_df = False
if timestamp_column not in data_columns:
logging.warning(f"{timestamp_column} can't be found as a column in your DataFrame! Columns found in DataFrame:")
logging.warning(f"{data_columns}")
column_in_df = False
return column_in_df