()
| 4730 | |
| 4731 | |
| 4732 | def 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 | |
| 4747 | def test_index_divisions(): |