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

Function test_fillna

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

Source from the content-addressed store, hash-verified

2358
2359
2360def test_fillna():
2361 df = _compat.makeMissingDataFrame()
2362 ddf = dd.from_pandas(df, npartitions=5, sort=False)
2363
2364 assert_eq(ddf.fillna(100), df.fillna(100))
2365 assert_eq(ddf.A.fillna(100), df.A.fillna(100))
2366 assert_eq(ddf.A.fillna(ddf["A"].mean()), df.A.fillna(df["A"].mean()))
2367 assert_eq(ddf.fillna(100, axis=1), df.fillna(100, axis=1))
2368
2369 pytest.raises(ValueError, lambda: ddf.A.fillna(0, axis=1))
2370
2371
2372def test_ffill():

Callers

nothing calls this directly

Calls 3

assert_eqFunction · 0.90
fillnaMethod · 0.45
meanMethod · 0.45

Tested by

no test coverage detected