def panel_index(time, panels, names=None):
if names is None:<EOL><INDENT>names = ['<STR_LIT:time>', '<STR_LIT>']<EOL><DEDENT>time, panels = _ensure_like_indices(time, panels)<EOL>return MultiIndex.from_arrays([time, panels], sortorder=None, names=names)<EOL>
Returns a multi-index suitable for a panel-like DataFrame.

Parameters
----------
time : array-like
    Time index, does not have to repeat
panels : array-like
    Panel index, does not have to repeat
names : list, optional
    List containing the names of the indices

Returns
-------
multi_index : MultiIndex
    Time index is the first level, the panels are the second level.

Examples
--------
>>> years = range(1960,1963)
>>> panels = ['A', 'B', 'C']
>>> panel_idx = panel_index(years, panels)
>>> panel_idx
MultiIndex([(1960, 'A'), (1961, 'A'), (1962, 'A'), (1960, 'B'),
            (1961, 'B'), (1962, 'B'), (1960, 'C'), (1961, 'C'),
            (1962, 'C')], dtype=object)

or

>>> years = np.repeat(range(1960,1963), 3)
>>> panels = np.tile(['A', 'B', 'C'], 3)
>>> panel_idx = panel_index(years, panels)
>>> panel_idx
MultiIndex([(1960, 'A'), (1960, 'B'), (1960, 'C'), (1961, 'A'),
            (1961, 'B'), (1961, 'C'), (1962, 'A'), (1962, 'B'),
            (1962, 'C')], dtype=object)