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

        :param df: A vaex DataFrame.

        Returns:
        :return copy: A shallow copy of the DataFrame that includes the encodings.
        :rtype: DataFrame
        '''

        default_value = None
        if self.allow_unseen:
            default_value = -1

        copy = df.copy()
        for feature in self.features:
            name = self.prefix + feature
            copy[name] = copy[feature].map(mapper=self.labels_[feature], default_value=default_value)

        return copy

        Transform a DataFrame with a fitted LabelEncoder.

        :param df: A vaex DataFrame.

        Returns:
        :return copy: A shallow copy of the DataFrame that includes the encodings.
        :rtype: DataFrame
        
Transform a DataFrame with a fitted LabelEncoder.
Transform a DataFrame with a fitted LabelEncoder .
def transform(self, df):
        default_value = None
        if self.allow_unseen:
            default_value = -1
        copy = df.copy()
        for feature in self.features:
            name = self.prefix + feature
            copy[name] = copy[feature].map(mapper=self.labels_[feature], default_value=default_value)
        return copy
def transform ( self , df ) : default_value = None if self . allow_unseen : default_value = - 1 copy = df . copy ( ) for feature in self . features : name = self . prefix + feature copy [ name ] = copy [ feature ] . map ( mapper = self . labels_ [ feature ] , default_value = default_value ) return copy
Transform a DataFrame with a fitted LabelEncoder.
Transform a DataFrame with a fitted LabelEncoder .
'''
        Transform a DataFrame with a fitted LabelEncoder.

        :param df: A vaex DataFrame.

        Returns:
        :return copy: 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 .
copy
self
df
A vaex DataFrame.
Returns.
A vaex DataFrame . Returns .