conftest.py 399 B

123456789101112131415161718
  1. import numpy as np
  2. import pytest
  3. from pandas import DataFrame
  4. @pytest.fixture
  5. def int_frame_const_col():
  6. """
  7. Fixture for DataFrame of ints which are constant per column
  8. Columns are ['A', 'B', 'C'], with values (per column): [1, 2, 3]
  9. """
  10. df = DataFrame(
  11. np.tile(np.arange(3, dtype="int64"), 6).reshape(6, -1) + 1,
  12. columns=["A", "B", "C"],
  13. )
  14. return df