def checkTimeSeriesIndex(esM, data):
    """
    Necessary if the data rows represent the time-dependent data:
    Check if the row-indices of the data match the time indices of the energy system model.
    """
    if list(data.index) != esM.totalTimeSteps:
        raise ValueError(
            """Time indices do not match the one of the specified energy system model.
"""
             + 'Data indices: ' + str(set(data.index)) + '\n' +
            'Energy system model time steps: ' + str(esM._timeSteps))
