build/lib/AutoMxL/Preprocessing/Date.py
def fit(self, df, l_var=None, verbose=False):
        """fit encoder

        Parameters
        ----------
        df : DataFrame
            input dataset
        l_var : list
            features to encode.
            If None, contains all features identified as dates (see Features_Type module)
        verbose : boolean (Default False)
            Get logging information
        """
        # get date features
        l_date_var = features_from_type(df, typ='date', l_var=None)

        # list of features to encode (in l_var and l_date_var)
        if l_var is None:
            self.l_var2encode = l_date_var
        else:
            self.l_var2encode = [col for col in l_var if col in l_date_var]

        # Fitted !!!!
        self.is_fitted = True

        # verbose
        if verbose:
            if self.method == 'timedelta':
                print(" **method " + self.method + " / date ref : ", self.date_ref)

            print("  >", len(self.l_var2encode), "features to transform")
            if len(self.l_var2encode) > 0:
                print(" ", self.l_var2encode)
fit encoder

        Parameters
        ----------
        df : DataFrame
            input dataset
        l_var : list
            features to encode.
            If None, contains all features identified as dates (see Features_Type module)
        verbose : boolean (Default False)
            Get logging information
        
fit encoder
Parameters

df : DataFrame
input dataset
l_var : list
features to encode.
If None, contains all features identified as dates
verbose : boolean (Default False)
Get logging information
fit encoder Parameters df : DataFrame input dataset l_var : list features to encode . If None contains all features identified as dates verbose : boolean ( Default False ) Get logging information
def fit(self, df, l_var=None, verbose=False):
        l_date_var = features_from_type(df, typ='date', l_var=None)
        if l_var is None:
            self.l_var2encode = l_date_var
        else:
            self.l_var2encode = [col for col in l_var if col in l_date_var]
        self.is_fitted = True
        if verbose:
            if self.method == 'timedelta':
                print(" **method " + self.method + " / date ref : ", self.date_ref)
            print("  >", len(self.l_var2encode), "features to transform")
            if len(self.l_var2encode) > 0:
                print(" ", self.l_var2encode)
def fit ( self , df , l_var = None , verbose = False ) : l_date_var = features_from_type ( df , typ = 'date' , l_var = None ) if l_var is None : self . l_var2encode = l_date_var else : self . l_var2encode = [ col for col in l_var if col in l_date_var ] self . is_fitted = True if verbose : if self . method == 'timedelta' : print ( " **method " + self . method + " / date ref : " , self . date_ref ) print ( "  >" , len ( self . l_var2encode ) , "features to transform" ) if len ( self . l_var2encode ) > 0 : print ( " " , self . l_var2encode )
fit encoder
Parameters
fit encoder Parameters
"""fit encoder

        Parameters
        ----------
        df : DataFrame
            input dataset
        l_var : list
            features to encode.
            If None, contains all features identified as dates (see Features_Type module)
        verbose : boolean (Default False)
            Get logging information
        """ # get date features # list of features to encode (in l_var and l_date_var) # Fitted !!!! # verbose
self
df
l_var
verbose