def ConvertContinueToBinary(signal, threshold = 0, maximize = True):
    """
    It converts a continue signal (in pandas DataFrame format) into a binany signal according to a rule defined by a threshold and a type of filter. 
    
    :param signal:
        input signal
    :type signal: pd.DataFrame
    
    :param threshold:
        value of the threshold. Default: 0
    :type threshold: float
    
    :param maximize:
        is True if the conversion is done for values higher than the threshold. Default: True
    :type maximize: bool

    :returns: pd.DataFrame 
            -- binarized signal
    """
    
    bool_data = signal.copy()
    
    if(maximize == True):
        for col in range(bool_data.columns.size) :
            for line in range(bool_data.index.size) :
                if bool_data.iat[line, col] > threshold :
                    bool_data.iat[line, col] = 1
                else :
                    bool_data.iat[line, col]  = 0
    else :
        for col in range(bool_data.columns.size) :
            for line in range(bool_data.index.size) :
                if bool_data.iat[line, col] > threshold :
                    bool_data.iat[line, col] = 0
                else :
                    bool_data.iat[line, col]  = 1
    
    return bool_data