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

Function test_assign_index

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

Source from the content-addressed store, hash-verified

4730
4731
4732def test_assign_index():
4733 df = pd.DataFrame({"x": [1, 2, 3, 4, 5]})
4734 ddf = dd.from_pandas(df, npartitions=2)
4735
4736 ddf_copy = ddf.copy()
4737
4738 ddf.index = ddf.index * 10
4739
4740 expected = df.copy()
4741 expected.index = expected.index * 10
4742
4743 assert_eq(ddf, expected)
4744 assert_eq(ddf_copy, df)
4745
4746
4747def test_index_divisions():

Callers

nothing calls this directly

Calls 2

assert_eqFunction · 0.90
copyMethod · 0.45

Tested by

no test coverage detected