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

Function _create_multiindex

pandas/conftest.py:657–674  ·  view source on GitHub ↗

MultiIndex used to test the general functionality of this object

()

Source from the content-addressed store, hash-verified

655
656
657def _create_multiindex():
658 """
659 MultiIndex used to test the general functionality of this object
660 """
661
662 # See Also: tests.multi.conftest.idx
663 major_axis = Index(["foo", "bar", "baz", "qux"])
664 minor_axis = Index(["one", "two"])
665
666 major_codes = np.array([0, 0, 1, 2, 3, 3])
667 minor_codes = np.array([0, 1, 0, 1, 0, 1])
668 index_names = ["first", "second"]
669 return MultiIndex(
670 levels=[major_axis, minor_axis],
671 codes=[major_codes, minor_codes],
672 names=index_names,
673 verify_integrity=False,
674 )
675
676
677def _create_mi_with_dt64tz_level():

Callers 1

conftest.pyFile · 0.85

Calls 3

IndexClass · 0.85
MultiIndexClass · 0.85
arrayMethod · 0.45

Tested by

no test coverage detected