def check_float(series, has_null, n):
    """
    Infer correct type of series considered as float
    """
    if series.nunique() == 2:
        unique = series.unique()
        if (unique[0] == 0.0 or unique[0] == 1.0) and (unique[1] == 0.0 or 
            unique[1] == 1.0):
            return 'float'
    all_integer = series.sample(n).apply(lambda x: x.is_integer()).all()
    if all_integer:
        if has_null:
            return 'nullable int'
        else:
            return 'int'
    else:
        return 'float'
