def panel_index(time, panels, names=None):
 if (names is None):
  names = ['time', 'panel']
 (time, panels) = _ensure_like_indices(time, panels)
 return MultiIndex.from_arrays([time, panels], sortorder=None, names=names)

def panel_index ( time , panels , names = None ) : if ( names is None ) : names = [ 'time' , 'panel' ] ( time , panels ) = _ensure_like_indices ( time , panels ) return MultiIndex . from_arrays ( [ time , panels ] , sortorder = None , names = names )
returns a multi-index suitable for a panel-like dataframe parameters time : array-like time index .