(self, features, return_type='np', scale_hashed=True, missing="zeros", scaler="standard", **kwargs)
Initialize the Preprocessor object based on the features dataframe.
        
        The features dataframe must include these columns: Name, Variable_Type, Feature_Strategy.      
        If Feature_Strategy includes hashing, the Hash_Features column must also be included.
        The dataframe must be indexed by Name.
                
        For further information on the columns refer to the project documentation: 
        https://github.com/nabeel-qlik/qlik-py-tools
Initialize the Preprocessor object based on the features dataframe.
        
        The features dataframe must include these columns: Name, Variable_Type, Feature_Strategy.      
        If Feature_Strategy includes hashing, the Hash_Features column must also be included.
        The dataframe must be indexed by Name.
                
        For further information on the columns refer to the project documentation: 
        https://github.com/nabeel-qlik/qlik-py-tools
Initialize the Preprocessor object based on the features dataframe . The features dataframe must include these columns : Name Variable_Type Feature_Strategy . If Feature_Strategy includes hashing the Hash_Features column must also be included . The dataframe must be indexed by Name . For further information on the columns refer to the project documentation : https : // github . com / nabeel - qlik / qlik - py - tools
def __init__(self, features, return_type='np', scale_hashed=True, missing="zeros", scaler="standard", **kwargs):
        """
        Initialize the Preprocessor object based on the features dataframe.
        
        The features dataframe must include these columns: Name, Variable_Type, Feature_Strategy.      
        If Feature_Strategy includes hashing, the Hash_Features column must also be included.
        The dataframe must be indexed by Name.
                
        For further information on the columns refer to the project documentation: 
        https://github.com/nabeel-qlik/qlik-py-tools
        """
        
        self.features = features
        self.return_type = return_type
        self.scale_hashed = scale_hashed
        self.missing = missing
        self.scaler = scaler
        self.kwargs = kwargs
        self.ohe = False
        self.hash = False
        self.scale = False
        self.no_prep = False
        
        # Collect features for one hot encoding
        self.ohe_meta = features.loc[features["feature_strategy"] == "one hot encoding"].copy()
        
        # Set a flag if one hot encoding will be required
        if len(self.ohe_meta) > 0:
            self.ohe = True
        
        # Collect features for hashing
        self.hash_meta = features.loc[features["feature_strategy"] == "hashing"].copy()
        
        # Set a flag if feature hashing will be required
        if len(self.hash_meta) > 0:
            self.hash = True
            
            # Convert Hash_Features column to integers
            self.hash_meta.loc[:,"hash_features"] = self.hash_meta.loc[:,"hash_features"].astype(np.int64)
        
        # Collect features for scaling
        self.scale_meta = features.loc[features["feature_strategy"] == "scaling"].copy()
        
        # Set a flag if scaling will be required
        if len(self.scale_meta) > 0:
            self.scale = True
        
        # Collect other features
        self.none_meta = features.loc[features["feature_strategy"] == "none"].copy()
        
        # Set a flag if there are features that don't require preprocessing
        if len(self.none_meta) > 0:
            self.no_prep = True
def __init__ ( self , features , return_type = 'np' , scale_hashed = True , missing = "zeros" , scaler = "standard" , * * kwargs ) : self . features = features self . return_type = return_type self . scale_hashed = scale_hashed self . missing = missing self . scaler = scaler self . kwargs = kwargs self . ohe = False self . hash = False self . scale = False self . no_prep = False # Collect features for one hot encoding self . ohe_meta = features . loc [ features [ "feature_strategy" ] == "one hot encoding" ] . copy ( ) # Set a flag if one hot encoding will be required if len ( self . ohe_meta ) > 0 : self . ohe = True # Collect features for hashing self . hash_meta = features . loc [ features [ "feature_strategy" ] == "hashing" ] . copy ( ) # Set a flag if feature hashing will be required if len ( self . hash_meta ) > 0 : self . hash = True # Convert Hash_Features column to integers self . hash_meta . loc [ : , "hash_features" ] = self . hash_meta . loc [ : , "hash_features" ] . astype ( np . int64 ) # Collect features for scaling self . scale_meta = features . loc [ features [ "feature_strategy" ] == "scaling" ] . copy ( ) # Set a flag if scaling will be required if len ( self . scale_meta ) > 0 : self . scale = True # Collect other features self . none_meta = features . loc [ features [ "feature_strategy" ] == "none" ] . copy ( ) # Set a flag if there are features that don't require preprocessing if len ( self . none_meta ) > 0 : self . no_prep = True