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

Function test_pyarrow_schema_dispatch

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

Source from the content-addressed store, hash-verified

5217
5218
5219def test_pyarrow_schema_dispatch():
5220 from dask.dataframe.dispatch import (
5221 pyarrow_schema_dispatch,
5222 to_pyarrow_table_dispatch,
5223 )
5224
5225 pytest.importorskip("pyarrow")
5226
5227 df = pd.DataFrame(np.random.randn(10, 3), columns=list("abc"))
5228 df["d"] = pd.Series(["cat", "dog"] * 5, dtype="string[pyarrow]")
5229 table = to_pyarrow_table_dispatch(df)
5230 schema = pyarrow_schema_dispatch(df)
5231
5232 assert schema.equals(table.schema)
5233
5234
5235@pytest.mark.parametrize("preserve_index", [True, False])

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected