def _index_to_label(index):
    if isinstance(index, pd.MultiIndex):
        return "-".join(map(str, index.names))
    else:
        return index.name
Convert a pandas index or multiindex to an axis label.
dataset/ETHPy150Open mwaskom/seaborn/seaborn/matrix.py/_index_to_label