Example #1
0
def test_none_missing_raises():
    df = pd.DataFrame(np.random.randn(5, 3))
    df.iloc[0, 0] = np.nan
    with pytest.raises(AssertionError):
        ck.none_missing(df)

    with pytest.raises(AssertionError):
        dc.none_missing()(_add_one)(df)
Example #2
0
def test_none_missing_raises():
    df = pd.DataFrame(np.random.randn(5, 3))
    df.iloc[0, 0] = np.nan
    with pytest.raises(AssertionError):
        ck.none_missing(df)

    with pytest.raises(AssertionError):
        dc.none_missing()(_add_one)(df)
Example #3
0
def test_none_missing():
    df = pd.DataFrame(np.random.randn(5, 3))
    result = ck.none_missing(df)
    tm.assert_frame_equal(df, result)

    result = dc.none_missing()(_add_one)(df)
    tm.assert_frame_equal(result, df + 1)
Example #4
0
def test_none_missing():
    df = pd.DataFrame(np.random.randn(5, 3))
    result = ck.none_missing(df)
    tm.assert_frame_equal(df, result)

    result = dc.none_missing()(_add_one)(df)
    tm.assert_frame_equal(result, df + 1)