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

Function test_pyarrow_conversion_dispatch

dask/dataframe/tests/test_dataframe.py:5253–5270  ·  view source on GitHub ↗
(self_destruct)

Source from the content-addressed store, hash-verified

5251
5252@pytest.mark.parametrize("self_destruct", [True, False])
5253def test_pyarrow_conversion_dispatch(self_destruct):
5254 from dask.dataframe.dispatch import (
5255 from_pyarrow_table_dispatch,
5256 to_pyarrow_table_dispatch,
5257 )
5258
5259 pytest.importorskip("pyarrow")
5260
5261 df1 = pd.DataFrame(np.random.randn(10, 3), columns=list("abc"))
5262 df1["d"] = pd.Series(["cat", "dog"] * 5, dtype="string[pyarrow]")
5263 df2 = from_pyarrow_table_dispatch(
5264 df1,
5265 to_pyarrow_table_dispatch(df1),
5266 self_destruct=self_destruct,
5267 )
5268
5269 assert type(df1) == type(df2)
5270 assert_eq(df1, df2)
5271
5272
5273@pytest.mark.gpu

Callers

nothing calls this directly

Calls 1

assert_eqFunction · 0.90

Tested by

no test coverage detected