def checkRegionalColumnTitles(esM, data):
    """
    Necessary if the data columns represent the location-dependent data:
    Check if the columns indices match the location indices of the energy system model.
    """
    if set(data.columns) != esM.locations:
        raise ValueError(
            """Location indices do not match the one of the specified energy system model.
"""
             + 'Data columns: ' + str(set(data.columns)) + '\n' +
            'Energy system model regions: ' + str(esM.locations))
