import logging


def classify_columns(df):
    """
       helper function to label each of the dataframes columns as categorical or numerical based on the data types

       input:
               df: pandas dataframe
       output:
               all_cols: list of all the dataframe columns
               categorical_cols: list of all the dataframe columns that store categorical values
               numeric_cols: list of all the dataframe columns that store numerical values
    """

    all_cols = sorted(list(df.columns))
    categorical_cols = [col for col in all_cols if df[col].dtype == "O"]
    numeric_cols = list(set(all_cols) - set(categorical_cols))
    logging.info("Classified all dataframes columns into categorical or numerical")
    return all_cols, categorical_cols, numeric_cols