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

Function test_Dataframe

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

Source from the content-addressed store, hash-verified

84
85
86def test_Dataframe():
87 expected = pd.Series(
88 [2, 3, 4, 5, 6, 7, 8, 9, 10], index=[0, 1, 3, 5, 6, 8, 9, 9, 9], name="a"
89 )
90
91 assert_eq(d["a"] + 1, expected)
92
93 tm.assert_index_equal(d.columns, pd.Index(["a", "b"]))
94
95 assert_eq(d[d["b"] > 2], full[full["b"] > 2])
96 assert_eq(d[["a", "b"]], full[["a", "b"]])
97 assert_eq(d.a, full.a)
98 assert d.b.mean().compute() == full.b.mean()
99 assert np.allclose(d.b.var().compute(), full.b.var())
100 assert np.allclose(d.b.std().compute(), full.b.std())
101
102 assert d.index._name == d.index._name # this is deterministic
103
104 assert repr(d)
105
106
107def test_head_tail():

Callers

nothing calls this directly

Calls 5

assert_eqFunction · 0.90
computeMethod · 0.45
meanMethod · 0.45
varMethod · 0.45
stdMethod · 0.45

Tested by

no test coverage detected