build/lib/AutoMxL/Preprocessing/Date.py
def transform(self, df, verbose=False):
        """ transform dataset date features using the encoder.
        Can be done only if encoder has been fitted

        Parameters
        ----------
        df : DataFrame
            dataset to transform
        verbose : boolean (Default False)
            Get logging information
        """
        assert self.is_fitted, 'fit the encoding first using .fit method'

        df_local = df.copy()

        # if list of features to encode not empty
        if len(self.l_var2encode) > 0:
            # transform features to datetime
            df_local = all_to_date(df_local, l_var=self.l_var2encode, verbose=verbose)

            # method timedelta
            if self.method == 'timedelta':
                df_local, _ = date_to_anc(df_local, l_var=self.l_var2encode, date_ref=self.date_ref, verbose=verbose)

        # if no features to transform
        elif verbose:
            print("  > No date to transform")

        return df_local
 transform dataset date features using the encoder.
        Can be done only if encoder has been fitted

        Parameters
        ----------
        df : DataFrame
            dataset to transform
        verbose : boolean (Default False)
            Get logging information
        
transform dataset date features using the encoder.
Can be done only if encoder has been fitted

Parameters

df : DataFrame
dataset to transform
verbose : boolean (Default False)
Get logging information
transform dataset date features using the encoder . Can be done only if encoder has been fitted Parameters df : DataFrame dataset to transform verbose : boolean ( Default False ) Get logging information
def transform(self, df, verbose=False):
        assert self.is_fitted, 'fit the encoding first using .fit method'
        df_local = df.copy()
        if len(self.l_var2encode) > 0:
            df_local = all_to_date(df_local, l_var=self.l_var2encode, verbose=verbose)
            if self.method == 'timedelta':
                df_local, _ = date_to_anc(df_local, l_var=self.l_var2encode, date_ref=self.date_ref, verbose=verbose)
        elif verbose:
            print("  > No date to transform")
        return df_local
def transform ( self , df , verbose = False ) : assert self . is_fitted , 'fit the encoding first using .fit method' df_local = df . copy ( ) if len ( self . l_var2encode ) > 0 : df_local = all_to_date ( df_local , l_var = self . l_var2encode , verbose = verbose ) if self . method == 'timedelta' : df_local , _ = date_to_anc ( df_local , l_var = self . l_var2encode , date_ref = self . date_ref , verbose = verbose ) elif verbose : print ( "  > No date to transform" ) return df_local
transform dataset date features using the encoder.
transform dataset date features using the encoder .
""" transform dataset date features using the encoder.
        Can be done only if encoder has been fitted

        Parameters
        ----------
        df : DataFrame
            dataset to transform
        verbose : boolean (Default False)
            Get logging information
        """ # if list of features to encode not empty # transform features to datetime # method timedelta # if no features to transform
self
df
verbose