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

Function test_Dataframe

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

Source from the content-addressed store, hash-verified

76
77
78def test_Dataframe():
79 expected = pd.Series(
80 [2, 3, 4, 5, 6, 7, 8, 9, 10], index=[0, 1, 3, 5, 6, 8, 9, 9, 9], name="a"
81 )
82
83 assert_eq(d["a"] + 1, expected)
84
85 tm.assert_index_equal(d.columns, pd.Index(["a", "b"]))
86
87 assert_eq(d[d["b"] > 2], full[full["b"] > 2])
88 assert_eq(d[["a", "b"]], full[["a", "b"]])
89 assert_eq(d.a, full.a)
90 assert d.b.mean().compute() == full.b.mean()
91 assert np.allclose(d.b.var().compute(), full.b.var())
92 assert np.allclose(d.b.std().compute(), full.b.std())
93
94 assert d.index._name == d.index._name # this is deterministic
95
96 assert repr(d)
97
98
99def 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