Exemplo n.º 1
0
def string_is_complex(series, state: dict) -> bool:
    def f(s):
        return s.apply(complex)

    coerced_series = test_utils.option_coercion_evaluator(f)(series)
    return (coerced_series is not None and not string_is_float(series, state)
            and test_imaginary_in_string(series))
Exemplo n.º 2
0
def test_string_is_float(series: pd.Series) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(string_to_float)(
        series)
    if coerced_series is not None and coerced_series in Float:
        return test_string_leading_zeros(series, coerced_series)

    return False
Exemplo n.º 3
0
def test_string_is_int(series) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(string_to_int)(series)
    return coerced_series is not None and coerced_series in Integer
Exemplo n.º 4
0
def test_string_is_float(series) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(to_float)(series)
    return coerced_series is not None and coerced_series in visions_float
Exemplo n.º 5
0
def test_string_is_complex(series) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(to_complex)(series)
    return coerced_series is not None and not test_string_is_float(series)
Exemplo n.º 6
0
def string_is_float(series: pd.Series, state: dict) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(f)(series)

    return (coerced_series is not None and coerced_series in Float
            and test_string_leading_zeros(series, coerced_series))
Exemplo n.º 7
0
def test_is_float(series: pd.Series) -> bool:
    coerced_series = test_utils.option_coercion_evaluator(to_float)(series)
    return coerced_series is not None and coerced_series in Float