cudf.MultiIndex.levels#

property MultiIndex.levels: list[cudf.core.index.Index][source]#

Returns list of levels in the MultiIndex

Returns:
List of Index objects

Examples

>>> import cudf
>>> df = cudf.DataFrame({'a':[1, 2, 3], 'b':[10, 11, 12]})
>>> cudf.MultiIndex.from_frame(df)
MultiIndex([(1, 10),
            (2, 11),
            (3, 12)],
        names=['a', 'b'])
>>> midx = cudf.MultiIndex.from_frame(df)
>>> midx
MultiIndex([(1, 10),
            (2, 11),
            (3, 12)],
        names=['a', 'b'])
>>> midx.levels
[Index([1, 2, 3], dtype='int64', name='a'), Index([10, 11, 12], dtype='int64', name='b')]