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

Function test_groupby_reductions

pandas/tests/arrays/integer/test_reduction.py:75–85  ·  view source on GitHub ↗
(op, expected)

Source from the content-addressed store, hash-verified

73 ],
74)
75def test_groupby_reductions(op, expected):
76 df = DataFrame(
77 {
78 "A": ["a", "b", "b"],
79 "B": array([1, None, 3], dtype="Int64"),
80 }
81 )
82 result = getattr(df.groupby("A"), op)()
83 expected = DataFrame(expected, index=pd.Index(["a", "b"], name="A"), columns=["B"])
84
85 tm.assert_frame_equal(result, expected)
86
87
88@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 3

groupbyMethod · 0.95
DataFrameClass · 0.90
arrayFunction · 0.90

Tested by

no test coverage detected