sebaba/utils.py
def split_numerical_categorical(df = None):
    """
    Function that creates a list for numerical and categorical variables respectively

    Parameters:
    --------------------------------------------------
        df: DataFrame

    Returns:
    --------------------------------------------------
        num_df: Dataframe of numerical variables only
        cat_df: Dataframe of categorical variables only
    """
    num_vars = df.select_dtypes(include = "number").columns.to_list()
    cat_vars = df.select_dtypes(exclude = "number").columns.to_list()

    num_df = df[num_vars]
    cat_df = df[cat_vars]
    
    return num_df, cat_df

    Function that creates a list for numerical and categorical variables respectively

    Parameters:
    --------------------------------------------------
        df: DataFrame

    Returns:
    --------------------------------------------------
        num_df: Dataframe of numerical variables only
        cat_df: Dataframe of categorical variables only
    
Function that creates a list for numerical and categorical variables respectively
Function that creates a list for numerical and categorical variables respectively
def split_numerical_categorical(df = None):
    num_vars = df.select_dtypes(include = "number").columns.to_list()
    cat_vars = df.select_dtypes(exclude = "number").columns.to_list()
    num_df = df[num_vars]
    cat_df = df[cat_vars]
    return num_df, cat_df
def split_numerical_categorical ( df = None ) : num_vars = df . select_dtypes ( include = "number" ) . columns . to_list ( ) cat_vars = df . select_dtypes ( exclude = "number" ) . columns . to_list ( ) num_df = df [ num_vars ] cat_df = df [ cat_vars ] return num_df , cat_df
Function that creates a list for numerical and categorical variables respectively
Function that creates a list for numerical and categorical variables respectively
"""
    Function that creates a list for numerical and categorical variables respectively

    Parameters:
    --------------------------------------------------
        df: DataFrame

    Returns:
    --------------------------------------------------
        num_df: Dataframe of numerical variables only
        cat_df: Dataframe of categorical variables only
    """
Dataframe of numerical variables only
cat_df: Dataframe of categorical variables only
Dataframe of numerical variables only cat_df : Dataframe of categorical variables only
num_df
df
None