def _index_to_ticklabels(index):
 if isinstance(index, pd.MultiIndex):
  return ['-'.join(map(str, i)) for i in index.values]
 else:
  return index.values

def _index_to_ticklabels ( index ) : if isinstance ( index , pd . MultiIndex ) : return [ '-' . join ( map ( str , i ) ) for i in index . values ] else : return index . values
convert a pandas index or multiindex into ticklabels .