packages/vaex-ml/vaex/ml/transformations.py
def transform(self, df):
        '''Transform a DataFrame with a fitted FrequencyEncoder.

        :param df: A vaex DataFrame.
        :return: A shallow copy of the DataFrame that includes the encodings.
        :rtype: DataFrame
        '''
        copy = df.copy()
        default_value = {'zero': 0., 'nan': np.nan}[self.unseen]
        for feature in self.features:
            name = self.prefix + feature
            expression = copy[feature].map(self.mappings_[feature], nan_value=np.nan, missing_value=np.nan, default_value=default_value, allow_missing=True)

            copy[name] = expression
        return copy
Transform a DataFrame with a fitted FrequencyEncoder.

        :param df: A vaex DataFrame.
        :return: A shallow copy of the DataFrame that includes the encodings.
        :rtype: DataFrame
        
Transform a DataFrame with a fitted FrequencyEncoder.
Transform a DataFrame with a fitted FrequencyEncoder .
def transform(self, df):
        copy = df.copy()
        default_value = {'zero': 0., 'nan': np.nan}[self.unseen]
        for feature in self.features:
            name = self.prefix + feature
            expression = copy[feature].map(self.mappings_[feature], nan_value=np.nan, missing_value=np.nan, default_value=default_value, allow_missing=True)
            copy[name] = expression
        return copy
def transform ( self , df ) : copy = df . copy ( ) default_value = { 'zero' : 0. , 'nan' : np . nan } [ self . unseen ] for feature in self . features : name = self . prefix + feature expression = copy [ feature ] . map ( self . mappings_ [ feature ] , nan_value = np . nan , missing_value = np . nan , default_value = default_value , allow_missing = True ) copy [ name ] = expression return copy
Transform a DataFrame with a fitted FrequencyEncoder.
Transform a DataFrame with a fitted FrequencyEncoder .
'''Transform a DataFrame with a fitted FrequencyEncoder.

        :param df: A vaex DataFrame.
        :return: A shallow copy of the DataFrame that includes the encodings.
        :rtype: DataFrame
        '''
A shallow copy of the DataFrame that includes the encodings.
A shallow copy of the DataFrame that includes the encodings .
DataFrame
self
df
A vaex DataFrame.
A vaex DataFrame .