예제 #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))
예제 #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
예제 #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
예제 #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
예제 #5
0
파일: complex.py 프로젝트: e-zl/visions
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)
예제 #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))
예제 #7
0
파일: float.py 프로젝트: ArtShp/DataScience
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