(op, targop)
| 170 | ], |
| 171 | ) |
| 172 | def test__cython_agg_general(op, targop): |
| 173 | df = DataFrame(np.random.default_rng(2).standard_normal(1000)) |
| 174 | labels = np.random.default_rng(2).integers(0, 50, size=1000).astype(float) |
| 175 | kwargs = {"ddof": 1} if op == "var" else {} |
| 176 | if op not in ["first", "last"]: |
| 177 | kwargs["axis"] = 0 |
| 178 | |
| 179 | result = df.groupby(labels)._cython_agg_general(op, alt=None, numeric_only=True) |
| 180 | expected = df.groupby(labels).agg(targop, **kwargs) |
| 181 | tm.assert_frame_equal(result, expected) |
| 182 | |
| 183 | |
| 184 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected