MCPcopy
hub / github.com/pandas-dev/pandas / left_right

Function left_right

pandas/tests/test_sorting.py:30–41  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

28
29@pytest.fixture
30def left_right():
31 low, high, n = -1 << 10, 1 << 10, 1 << 20
32 left = DataFrame(
33 np.random.default_rng(2).integers(low, high, (n, 7)), columns=list("ABCDEFG")
34 )
35 left["left"] = left.sum(axis=1)
36 right = left.sample(
37 frac=1, random_state=np.random.default_rng(2), ignore_index=True
38 )
39 right.columns = [*right.columns[:-1].tolist(), "right"]
40 right["right"] *= -1
41 return left, right
42
43
44class TestSorting:

Callers

nothing calls this directly

Calls 4

sumMethod · 0.95
DataFrameClass · 0.90
sampleMethod · 0.45
tolistMethod · 0.45

Tested by

no test coverage detected