def type_target(s, cat_proportion_threshold=0.01,
                cat_absolute_threshold=20):
    """Returns task type for target column

    Args:
        s (pd.Series): column values

        cat_proportion_threshold (float): percentage of unique values in
            series. Default 0.01
        cat_absolute_threshold (int): absolute value count. Default = 20.
            The minimum of cat_proportion_threshhold and
            cat_absolute_threshold is used to define the actual threshhold.

    Returns:
        task_type (str): type of the task. Current possible values:
            classification, regression.

    """
    task_type = None
    if s.dtype in ['float16', 'float32', 'float64']:
        task_type = 'regression'
    elif s.dtype == 'datetime64[ns]':
        raise ValueError('DateTime type is not supported as target value')

    elif (s.value_counts().size - 1 <
            min(cat_proportion_threshold * s.size, cat_absolute_threshold)):
        # valid both for integer or text values
        # seems like categorical
        task_type = 'classification'
    elif s.dtype in ['intc', 'intp', 'int8', 'int16', 'int32', 'int64',
                     'uint8', 'uint16', 'uint32', 'uint64']:
        # for cagegorical numerical value it will be caught by the previous if
        task_type = 'regression'
    else:
        # if we are here the dtype is not numerical and has a lot of values,
        # warn user about this won't be a good dtype for a classificaiton task
        task_type = 'classificaiton'
        print("WARNING! This does not seem as regression problem and there are"
              "too many types (" + str(s.value_counts().size) +
              ") for classification problem. Data type is: " + str(s.dtype))

    return task_type