From 72bbb7dc2ce9ea8ee7f143d24160fa0fcd604ff1 Mon Sep 17 00:00:00 2001 From: Matthew Rocklin Date: Wed, 15 Jul 2015 14:48:33 -0700 Subject: [PATCH] ensure that index information passes through castra --- dask/dataframe/tests/test_io.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/dask/dataframe/tests/test_io.py b/dask/dataframe/tests/test_io.py index 7aa93aeec9cc..efc0121f801a 100644 --- a/dask/dataframe/tests/test_io.py +++ b/dask/dataframe/tests/test_io.py @@ -399,12 +399,15 @@ def test_from_dask_array_raises(): def test_to_castra(): pytest.importorskip('castra') df = pd.DataFrame({'x': ['a', 'b', 'c', 'd'], - 'y': [1, 2, 3, 4]}) + 'y': [1, 2, 3, 4]}, + index=pd.Index([1., 2., 3., 4.], name='ind')) a = dd.from_pandas(df, 2) c = a.to_castra() + b = c.to_dask() try: tm.assert_frame_equal(df, c[:]) + tm.assert_frame_equal(b.compute(), df) finally: c.drop()