MCPcopy Create free account
hub / github.com/dask/dask / test_bfill

Function test_bfill

dask/dataframe/tests/test_dataframe.py:2390–2404  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2388
2389
2390def test_bfill():
2391 df = _compat.makeMissingDataFrame()
2392 ddf = dd.from_pandas(df, npartitions=5, sort=False)
2393
2394 assert_eq(ddf.bfill(), df.bfill())
2395 assert_eq(ddf.A.bfill(), df.A.bfill())
2396
2397 assert_eq(ddf.bfill(limit=2), df.bfill(limit=2))
2398 assert_eq(ddf.A.bfill(limit=2), df.A.bfill(limit=2))
2399
2400 df = _compat.makeMissingDataFrame()
2401 df.iloc[:15, 0] = np.nan # all NaN partition
2402 ddf = dd.from_pandas(df, npartitions=5, sort=False)
2403 pytest.raises(ValueError, lambda: ddf.bfill().compute())
2404 assert_eq(df.bfill(limit=3), ddf.bfill(limit=3))
2405
2406
2407@pytest.mark.parametrize("optimize", [True, False])

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
bfillMethod · 0.45
computeMethod · 0.45

Tested by

no test coverage detected