data_preprocess.py
def sep_nondummies(data):
    """
    Finds the features that are:
        1. have nominal values
        2. have more than 2 distinct values so it needs to be dummified

    Args:
        data: DataFrame containing the dataset

    Returns:
        nominal: Array-like structure that contains the nominal features
        continuous: Array-like structure that contains the names of all the continuous features
    """
    nominal = []
    continuous=[]
    for col in data.columns:
        distinct = data[col].dropna().nunique()
        if distinct > 10:
            continuous.append(col)  
        elif distinct > 2:  
            nominal.append(col) 
    return [nominal, continuous]

    Finds the features that are:
        1. have nominal values
        2. have more than 2 distinct values so it needs to be dummified

    Args:
        data: DataFrame containing the dataset

    Returns:
        nominal: Array-like structure that contains the nominal features
        continuous: Array-like structure that contains the names of all the continuous features
    
Finds the features that are:
1. have nominal values
2. have more than 2 distinct values so it needs to be dummified
Finds the features that are : 1 . have nominal values 2 . have more than 2 distinct values so it needs to be dummified
def sep_nondummies(data):
    nominal = []
    continuous=[]
    for col in data.columns:
        distinct = data[col].dropna().nunique()
        if distinct > 10:
            continuous.append(col)  
        elif distinct > 2:  
            nominal.append(col) 
    return [nominal, continuous]
def sep_nondummies ( data ) : nominal = [ ] continuous = [ ] for col in data . columns : distinct = data [ col ] . dropna ( ) . nunique ( ) if distinct > 10 : continuous . append ( col ) elif distinct > 2 : nominal . append ( col ) return [ nominal , continuous ]
Finds the features that are:
1. have nominal values
2. have more than 2 distinct values so it needs to be dummified
Finds the features that are : 1 . have nominal values 2 . have more than 2 distinct values so it needs to be dummified
"""
    Finds the features that are:
        1. have nominal values
        2. have more than 2 distinct values so it needs to be dummified

    Args:
        data: DataFrame containing the dataset

    Returns:
        nominal: Array-like structure that contains the nominal features
        continuous: Array-like structure that contains the names of all the continuous features
    """
Array-like structure that contains the nominal features
continuous: Array-like structure that contains the names of all the continuous features
Array - like structure that contains the nominal features continuous : Array - like structure that contains the names of all the continuous features
nominal
data
DataFrame containing the dataset
DataFrame containing the dataset