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

Function test_sort_values

dask/dataframe/dask_expr/tests/test_distributed.py:283–293  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

281
282
283def test_sort_values():
284 with LocalCluster(processes=False, n_workers=2, dashboard_address=":0") as cluster:
285 with Client(cluster) as client: # noqa: F841
286 pdf = pd.DataFrame({"a": [5] + list(range(100)), "b": 2})
287 df = from_pandas(pdf, npartitions=10)
288
289 out = df.sort_values(by="a").compute()
290 pd.testing.assert_frame_equal(
291 out.reset_index(drop=True),
292 pdf.sort_values(by="a", ignore_index=True),
293 )
294
295
296@pytest.mark.parametrize("add_repartition", [True, False])

Callers

nothing calls this directly

Calls 4

sort_valuesMethod · 0.95
from_pandasFunction · 0.90
reset_indexMethod · 0.80
computeMethod · 0.45

Tested by

no test coverage detected