def trim_data(data, start, end):
    """
    This function takes in a dataframe object and trims it to the two supplied
    time indexes.

    Parameters:
    ---------------------
    data - pandas DataFrame object
        A dataframe containing the tidal elevation data

    start - string
        A string of the format "yyyy-mm-dd hh:mm:ss" denoting the start index

    end - string
        A string of the format "yyyy-mm-dd hh:mm:ss" denoting the end index

    OUTPUT:
    --------------
    This function returns a dataframe object that has been trimmed to start
    and end indexes given
    """

    data = data.set_index(data["Date Time"])
    subset = data.loc[start:end]
    return subset