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

Method test_frame_series_axis

pandas/tests/test_expressions.py:417–435  ·  view source on GitHub ↗
(self, axis, arith, _frame, monkeypatch)

Source from the content-addressed store, hash-verified

415 )
416 @pytest.mark.parametrize("axis", (0, 1))
417 def test_frame_series_axis(self, axis, arith, _frame, monkeypatch):
418 # GH#26736 Dataframe.floordiv(Series, axis=1) fails
419
420 df = _frame
421 if axis == 1:
422 other = df.iloc[0, :]
423 else:
424 other = df.iloc[:, 0]
425
426 with monkeypatch.context() as m:
427 m.setattr(expr, "_MIN_ELEMENTS", 0)
428
429 op_func = getattr(df, arith)
430
431 with option_context("compute.use_numexpr", False):
432 expected = op_func(other, axis=axis)
433
434 result = op_func(other, axis=axis)
435 tm.assert_frame_equal(expected, result)
436
437 @pytest.mark.parametrize(
438 "op",

Callers

nothing calls this directly

Calls 1

option_contextFunction · 0.90

Tested by

no test coverage detected