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

Function test_sort_values_add

dask/dataframe/dask_expr/tests/test_shuffle.py:568–576  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

566
567
568def test_sort_values_add():
569 pdf = pd.DataFrame({"x": [1, 2, 3, 0, 1, 2, 4, 5], "y": 1})
570 df = from_pandas(pdf, npartitions=2, sort=False)
571 with dask.config.set({"dataframe.shuffle.method": "tasks"}):
572 df = df.sort_values("x")
573 df["z"] = df.x + df.y
574 pdf = pdf.sort_values("x")
575 pdf["z"] = pdf.x + pdf.y
576 assert_eq(df, pdf, sort_results=False)
577
578
579@pytest.mark.parametrize("null_value", [None, pd.NaT, pd.NA])

Callers

nothing calls this directly

Calls 4

sort_valuesMethod · 0.95
from_pandasFunction · 0.90
assert_eqFunction · 0.90
setMethod · 0.80

Tested by

no test coverage detected